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

Brian Curtin webhook-mailer at python.org
Wed Jan 9 17:52:24 EST 2019


https://github.com/python/cpython/commit/e394ba32147f687b6bc7518d461f1d84211698e0
commit: e394ba32147f687b6bc7518d461f1d84211698e0
branch: master
author: Charles-Axel Dein <charlesaxel.dein at gmail.com>
committer: Brian Curtin <brian at python.org>
date: 2019-01-09T15:52:10-07:00
summary:

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

files:
M Doc/library/email.message.rst

diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index 77b8099a7d4c..f1806a0866bb 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -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())



More information about the Python-checkins mailing list