summaryrefslogtreecommitdiffstats
path: root/Lib/email/base64mime.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2010-07-27 21:20:15 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2010-07-27 21:20:15 (GMT)
commitf1046ca8173380e2c320c56e1cdc911493371057 (patch)
treec3eabb51cc16a958e1fd1ca6700036d8b365d48b /Lib/email/base64mime.py
parent4bf70686fab91dcc5603c11c36f77bd2131ff6ed (diff)
downloadcpython-f1046ca8173380e2c320c56e1cdc911493371057.zip
cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.gz
cpython-f1046ca8173380e2c320c56e1cdc911493371057.tar.bz2
Issue #4770: Restrict binascii module to accept only bytes (as specified).
And fix the email package to encode to ASCII instead of ``raw-unicode-escape`` before ASCII-to-binary decoding.
Diffstat (limited to 'Lib/email/base64mime.py')
-rw-r--r--Lib/email/base64mime.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/email/base64mime.py b/Lib/email/base64mime.py
index 6cbfdf6..f3bbac1 100644
--- a/Lib/email/base64mime.py
+++ b/Lib/email/base64mime.py
@@ -74,12 +74,12 @@ def header_encode(header_bytes, charset='iso-8859-1'):
def body_encode(s, maxlinelen=76, eol=NL):
- """Encode a string with base64.
+ r"""Encode a string with base64.
Each line will be wrapped at, at most, maxlinelen characters (defaults to
76 characters).
- Each line of encoded text will end with eol, which defaults to "\\n". Set
+ Each line of encoded text will end with eol, which defaults to "\n". Set
this to "\r\n" if you will be using the result of this function directly
in an email.
"""