summaryrefslogtreecommitdiffstats
path: root/Doc/library/email.header.rst
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-10-23 22:19:56 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-10-23 22:19:56 (GMT)
commit8451c4b6e044f83efc2298a79af58c3e56d946a2 (patch)
treeedaad1a89627de27ad30b465b7a416c468850653 /Doc/library/email.header.rst
parent29aad0005dd56634363dabd74cf6708c9a255b43 (diff)
downloadcpython-8451c4b6e044f83efc2298a79af58c3e56d946a2.zip
cpython-8451c4b6e044f83efc2298a79af58c3e56d946a2.tar.gz
cpython-8451c4b6e044f83efc2298a79af58c3e56d946a2.tar.bz2
#1349106: add linesep argument to generator.flatten and header.encode.
Diffstat (limited to 'Doc/library/email.header.rst')
-rw-r--r--Doc/library/email.header.rst9
1 files changed, 8 insertions, 1 deletions
diff --git a/Doc/library/email.header.rst b/Doc/library/email.header.rst
index 1d530b2..d9ebdb7 100644
--- a/Doc/library/email.header.rst
+++ b/Doc/library/email.header.rst
@@ -104,7 +104,7 @@ Here is the :class:`Header` class description:
:func:`ustr.encode` call, and defaults to "strict".
- .. method:: encode(splitchars=';, \\t', maxlinelen=None)
+ .. method:: encode(splitchars=';, \\t', maxlinelen=None, linesep='\\n')
Encode a message header into an RFC-compliant format, possibly wrapping
long lines and encapsulating non-ASCII parts in base64 or quoted-printable
@@ -115,6 +115,13 @@ Here is the :class:`Header` class description:
*maxlinelen*, if given, overrides the instance's value for the maximum
line length.
+ *linesep* specifies the characters used to separate the lines of the
+ folded header. It defaults to the most useful value for Python
+ application code (``\n``), but ``\r\n`` can be specified in order
+ to produce headers with RFC-compliant line separators.
+
+ .. versionchanged:: 3.2 added the linesep argument
+
The :class:`Header` class also provides a number of methods to support
standard operators and built-in functions.