summaryrefslogtreecommitdiff
path: root/Lib/email/utils.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-09-21 16:27:45 +0300
committerEzio Melotti <ezio.melotti@gmail.com>2012-09-21 16:27:45 +0300
commit003014bf1e7efcfcad19bd391b206e111ea21083 (patch)
tree6b440842b0b7667e341d335e7b331d191ea645c4 /Lib/email/utils.py
parent3d2fc15f82f495e6b53a0e7bc60b2283ccbcb5d3 (diff)
downloadcpython-git-003014bf1e7efcfcad19bd391b206e111ea21083.tar.gz
#15980: properly escape newlines in docstrings. Patch by Serhiy Storchaka.
Diffstat (limited to 'Lib/email/utils.py')
-rw-r--r--Lib/email/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/utils.py b/Lib/email/utils.py
index 6d22ca7e09..c976021e0e 100644
--- a/Lib/email/utils.py
+++ b/Lib/email/utils.py
@@ -63,7 +63,7 @@ def _bdecode(s):
"""Decodes a base64 string.
This function is equivalent to base64.decodestring and it's retained only
- for backward compatibility. It used to remove the last \n of the decoded
+ for backward compatibility. It used to remove the last \\n of the decoded
string, if it had any (see issue 7143).
"""
if not s:
@@ -73,7 +73,7 @@ def _bdecode(s):
def fix_eols(s):
- """Replace all line-ending characters with \r\n."""
+ """Replace all line-ending characters with \\r\\n."""
# Fix newlines with no preceding carriage return
s = re.sub(r'(?<!\r)\n', CRLF, s)
# Fix carriage returns with no following newline