]> granicus.if.org Git - python/commitdiff
bpo-35404: Clarify how to import _structure in email.message doc (GH-10886)
authorCharles-Axel Dein <charlesaxel.dein@gmail.com>
Wed, 9 Jan 2019 22:52:10 +0000 (23:52 +0100)
committerBrian Curtin <brian@python.org>
Wed, 9 Jan 2019 22:52:10 +0000 (15:52 -0700)
Doc/library/email.message.rst

index 77b8099a7d4cd33121bf37762d89d4252f42b816..f1806a0866bb810a9d81c2d9cba406960c89aced 100644 (file)
@@ -487,7 +487,6 @@ message objects.
          from email import message_from_binary_file
          with open('../Lib/test/test_email/data/msg_16.txt', 'rb') as f:
              msg = message_from_binary_file(f)
-         from email.iterators import _structure
 
       .. doctest::
 
@@ -509,6 +508,7 @@ message objects.
 
       .. doctest::
 
+         >>> from email.iterators import _structure
          >>> for part in msg.walk():
          ...     print(part.get_content_maintype() == 'multipart',
          ...           part.is_multipart())