summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.generator.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2014-05-07 01:33:18 (GMT)
committerR David Murray <rdmurray@bitdance.com>2014-05-07 01:33:18 (GMT)
commite25244657c5be459a98be06c745c35ff8a216c36 (patch)
tree00459a94dbf79f3037f4d698eccb307c1bc6e079 /Doc/library/email.generator.rst
parent3d139d8ed6712f39f4e91dc084ed421b76af09ae (diff)
downloadcpython-e25244657c5be459a98be06c745c35ff8a216c36.zip
cpython-e25244657c5be459a98be06c745c35ff8a216c36.tar.gz
cpython-e25244657c5be459a98be06c745c35ff8a216c36.tar.bz2
#21300: Clean up the docs for the email "policy" arguments.
Diffstat (limited to 'Doc/library/email.generator.rst')
-rw-r--r--Doc/library/email.generator.rst10
1 files changed, 6 insertions, 4 deletions
diff --git a/Doc/library/email.generator.rst b/Doc/library/email.generator.rst
index c172acb..48d41e1 100644
--- a/Doc/library/email.generator.rst
+++ b/Doc/library/email.generator.rst
@@ -112,7 +112,7 @@ formatted string representation of a message object. For more detail, see
:mod:`email.message`.
.. class:: BytesGenerator(outfp, mangle_from_=True, maxheaderlen=78, *, \
- policy=policy.default)
+ policy=None)
The constructor for the :class:`BytesGenerator` class takes a binary
:term:`file-like object` called *outfp* for an argument. *outfp* must
@@ -134,9 +134,11 @@ formatted string representation of a message object. For more detail, see
wrapping. The default is 78, as recommended (but not required) by
:rfc:`2822`.
+
The *policy* keyword specifies a :mod:`~email.policy` object that controls a
- number of aspects of the generator's operation. The default policy
- maintains backward compatibility.
+ number of aspects of the generator's operation. If no *policy* is specified,
+ then the *policy* attached to the message object passed to :attr:`flatten`
+ is used.
.. versionchanged:: 3.3 Added the *policy* keyword.
@@ -174,7 +176,7 @@ formatted string representation of a message object. For more detail, see
Optional *linesep* specifies the line separator character used to
terminate lines in the output. If specified it overrides the value
- specified by the ``Generator``\ 's ``policy``.
+ specified by the ``Generator``\ or *msg*\ 's ``policy``.
.. method:: clone(fp)