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'):

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

+ """ # 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'):

There are many issues involved in converting a given string for use in an email header. Only certain character sets are readable in most