Commit e394ba32 authored by Charles-Axel Dein's avatar Charles-Axel Dein Committed by Brian Curtin

bpo-35404: Clarify how to import _structure in email.message doc (GH-10886)

parent d6acf17c
...@@ -487,7 +487,6 @@ message objects. ...@@ -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. ...@@ -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())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment