[Python-checkins] cpython (merge 3.2 -> default): merge #1440472: Explain that email parser/generator isn't *quite* "idempotent"
r.david.murray
python-checkins at python.org
Wed May 16 04:14:10 CEST 2012
http://hg.python.org/cpython/rev/f534e6363bfb
changeset: 76978:f534e6363bfb
parent: 76976:97601cbf169f
parent: 76977:8bd30967bc4b
user: R David Murray <rdmurray at bitdance.com>
date: Tue May 15 22:09:14 2012 -0400
summary:
merge #1440472: Explain that email parser/generator isn't *quite* "idempotent"
files:
Doc/library/email.generator.rst | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst
--- a/Doc/library/email.generator.rst
+++ b/Doc/library/email.generator.rst
@@ -17,7 +17,8 @@
standards-compliant way, should handle MIME and non-MIME email messages just
fine, and is designed so that the transformation from flat text, to a message
structure via the :class:`~email.parser.Parser` class, and back to flat text,
-is idempotent (the input is identical to the output). On the other hand, using
+is idempotent (the input is identical to the output) [#]_. On the other hand,
+using
the Generator on a :class:`~email.message.Message` constructed by program may
result in changes to the :class:`~email.message.Message` object as defaults are
filled in.
@@ -223,3 +224,12 @@
The default value for *fmt* is ``None``, meaning ::
[Non-text (%(type)s) part of message omitted, filename %(filename)s]
+
+
+.. rubric:: Footnotes
+
+.. [#] This statement assumes that you use the appropriate setting for the
+ ``unixfrom`` argument, and that you set maxheaderlen=0 (which will
+ preserve whatever the input line lengths were). It is also not strictly
+ true, since in many cases runs of whitespace in headers are collapsed
+ into single blanks. The latter is a bug that will eventually be fixed.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list