mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
bpo-35404: Clarify how to import _structure in email.message doc (GH-10886)
This commit is contained in:
parent
d6acf17c05
commit
e394ba3214
1 changed files with 1 additions and 1 deletions
|
@ -487,7 +487,6 @@ message objects.
|
||||||
from email import message_from_binary_file
|
from email import message_from_binary_file
|
||||||
with open('../Lib/test/test_email/data/msg_16.txt', 'rb') as f:
|
with open('../Lib/test/test_email/data/msg_16.txt', 'rb') as f:
|
||||||
msg = message_from_binary_file(f)
|
msg = message_from_binary_file(f)
|
||||||
from email.iterators import _structure
|
|
||||||
|
|
||||||
.. doctest::
|
.. doctest::
|
||||||
|
|
||||||
|
@ -509,6 +508,7 @@ message objects.
|
||||||
|
|
||||||
.. doctest::
|
.. doctest::
|
||||||
|
|
||||||
|
>>> from email.iterators import _structure
|
||||||
>>> for part in msg.walk():
|
>>> for part in msg.walk():
|
||||||
... print(part.get_content_maintype() == 'multipart',
|
... print(part.get_content_maintype() == 'multipart',
|
||||||
... part.is_multipart())
|
... part.is_multipart())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue