summaryrefslogtreecommitdiff
path: root/Doc/includes/email-headers.py
diff options
context:
space:
mode:
authorLarry Hastings <larry@hastings.org>2015-02-26 05:58:48 -0800
committerLarry Hastings <larry@hastings.org>2015-02-26 05:58:48 -0800
commit8c3ec536e924002dc3afe4ff92e32fe9ed82ebab (patch)
treef141eec287584ba9d58d32461e1a7d92b5466e91 /Doc/includes/email-headers.py
parente287746401398ee81c8e8a1513a5fe828eb32559 (diff)
parent7b2c3c6840052ea6f8b41253faf38b9e24f9a453 (diff)
downloadcpython-git-8c3ec536e924002dc3afe4ff92e32fe9ed82ebab.tar.gz
Merge 3.4.3 release engineering changes back into 3.4.
Diffstat (limited to 'Doc/includes/email-headers.py')
-rw-r--r--Doc/includes/email-headers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/includes/email-headers.py b/Doc/includes/email-headers.py
index a53317dbd8..89c8f3af32 100644
--- a/Doc/includes/email-headers.py
+++ b/Doc/includes/email-headers.py
@@ -1,8 +1,9 @@
# Import the email modules we'll need
from email.parser import Parser
-# If the e-mail headers are in a file, uncomment this line:
-#headers = Parser().parse(open(messagefile, 'r'))
+# If the e-mail headers are in a file, uncomment these two lines:
+# with open(messagefile) as fp:
+# headers = Parser().parse(fp)
# Or for parsing headers in a string, use:
headers = Parser().parsestr('From: <user@example.com>\n'