cpython: f6cab3819160 (original) (raw)
Mercurial > cpython
changeset 68471:f6cab3819160 3.2
Harmonize linesep docstrings, and fix the quoting of \r\n
R David Murray rdmurray@bitdance.com | |
---|---|
date | Mon, 14 Mar 2011 18:35:56 -0400 |
parents | a89d654adaa2 |
children | cfa6845fbed8 aafb0fed1811 |
files | Lib/email/generator.py Lib/email/header.py |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-)[+] [-] Lib/email/generator.py 7 Lib/email/header.py 2 |
line wrap: on
line diff
--- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -59,7 +59,7 @@ class Generator: self._fp.write(s) def flatten(self, msg, unixfrom=False, linesep='\n'):
"""Print the message object tree rooted at msg to the output file[](#l1.7)
r"""Print the message object tree rooted at msg to the output file[](#l1.8) specified when the Generator instance was created.[](#l1.9)
unixfrom is a flag that forces the printing of a Unix From_ delimiter @@ -70,7 +70,10 @@ class Generator: Note that for subobjects, no From_ line is printed. linesep specifies the characters used to indicate a new line in
the output.[](#l1.16)
the output. The default value is the most useful for typical[](#l1.17)
Python applications, but it can be set to \r\n to produce RFC-compliant[](#l1.18)
line separators when needed.[](#l1.19)
+ """ # We use the _XXX constants for operating on data that comes directly # from the msg, and _encoded_XXX constants for operating on data that
--- a/Lib/email/header.py +++ b/Lib/email/header.py @@ -276,7 +276,7 @@ class Header: self._chunks.append((s, charset)) def encode(self, splitchars=';, \t', maxlinelen=None, linesep='\n'):
"""Encode a message header into an RFC-compliant format.[](#l2.7)
r"""Encode a message header into an RFC-compliant format.[](#l2.8)
There are many issues involved in converting a given string for use in an email header. Only certain character sets are readable in most