summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.generator.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-05-16 02:09:14 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-05-16 02:09:14 (GMT)
commitb3ad106dca467eec26d913cc48a0a4c0cbace35d (patch)
treefa68e4647f819b6c665b57ab6e8c149f245aad39 /Doc/library/email.generator.rst
parenta0082788e4a1e7d821f2ced3a33988882e360fb1 (diff)
parentea1badbfef340c63d4f821662c887e46ed62a6ec (diff)
downloadcpython-b3ad106dca467eec26d913cc48a0a4c0cbace35d.zip
cpython-b3ad106dca467eec26d913cc48a0a4c0cbace35d.tar.gz
cpython-b3ad106dca467eec26d913cc48a0a4c0cbace35d.tar.bz2
merge #1440472: Explain that email parser/generator isn't *quite* "idempotent"
Diffstat (limited to 'Doc/library/email.generator.rst')
-rw-r--r--Doc/library/email.generator.rst12
1 files changed, 11 insertions, 1 deletions
diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst
index 847d7e4..58d7969 100644
--- a/Doc/library/email.generator.rst
+++ b/Doc/library/email.generator.rst
@@ -17,7 +17,8 @@ yourself. However the bundled generator knows how to generate most email in a
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 @@ representing the part.
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.