Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cd37dfcf
Commit
cd37dfcf
authored
Mar 14, 2011
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harmonize linesep docstrings, and fix the quoting of \r\n
parent
f8b9dfd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
Lib/email/generator.py
Lib/email/generator.py
+5
-2
Lib/email/header.py
Lib/email/header.py
+1
-1
No files found.
Lib/email/generator.py
View file @
cd37dfcf
...
...
@@ -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
r
"""Print the message object tree rooted at msg to the output file
specified when the Generator instance was created.
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.
the output. The default value is the most useful for typical
Python applications, but it can be set to \r\n to produce RFC-compliant
line separators when needed.
"""
# We use the _XXX constants for operating on data that comes directly
# from the msg, and _encoded_XXX constants for operating on data that
...
...
Lib/email/header.py
View file @
cd37dfcf
...
...
@@ -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.
r
"""Encode a message header into an RFC-compliant format.
There are many issues involved in converting a given string for use in
an email header. Only certain character sets are readable in most
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment