summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2011-03-15 18:04:00 (GMT)
committerR David Murray <rdmurray@bitdance.com>2011-03-15 18:04:00 (GMT)
commitab1dfd68e1dd1e5251c6dfa9bc45b10f45ce39a6 (patch)
treee12b217b911aff496e936ab0a8010ed41063a78a /Doc
parent3796befe3780b1d2cf66ec36b96167a05ae6c58c (diff)
parent4a0b60c5273451909d8bd6e538c140c9c42593c7 (diff)
downloadcpython-ab1dfd68e1dd1e5251c6dfa9bc45b10f45ce39a6.zip
cpython-ab1dfd68e1dd1e5251c6dfa9bc45b10f45ce39a6.tar.gz
cpython-ab1dfd68e1dd1e5251c6dfa9bc45b10f45ce39a6.tar.bz2
Merge #11555 as_string doc fix from 3.2.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/email.message.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/email.message.rst b/Doc/library/email.message.rst
index 11984a5..ebe2d9c 100644
--- a/Doc/library/email.message.rst
+++ b/Doc/library/email.message.rst
@@ -46,15 +46,16 @@ Here are the methods of the :class:`Message` class:
be generated or modified).
Note that this method is provided as a convenience and may not always
- format the message the way you want. For example, by default it mangles
- lines that begin with ``From``. For more flexibility, instantiate a
+ format the message the way you want. For example, by default it does
+ not do the mangling of lines that begin with ``From`` that is
+ required by the unix mbox format. For more flexibility, instantiate a
:class:`~email.generator.Generator` instance and use its :meth:`flatten`
method directly. For example::
from io import StringIO
from email.generator import Generator
fp = StringIO()
- g = Generator(fp, mangle_from_=False, maxheaderlen=60)
+ g = Generator(fp, mangle_from_=True, maxheaderlen=60)
g.flatten(msg)
text = fp.getvalue()