[Python-checkins] cpython: Add '__all__' to _encoded_words and mark QByteMap as private.
r.david.murray
python-checkins at python.org
Sun May 27 18:40:07 CEST 2012
http://hg.python.org/cpython/rev/c1eab1ef9c0b
changeset: 77183:c1eab1ef9c0b
user: R David Murray <rdmurray at bitdance.com>
date: Sun May 27 12:39:54 2012 -0400
summary:
Add '__all__' to _encoded_words and mark QByteMap as private.
files:
Lib/email/_encoded_words.py | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/Lib/email/_encoded_words.py b/Lib/email/_encoded_words.py
--- a/Lib/email/_encoded_words.py
+++ b/Lib/email/_encoded_words.py
@@ -46,6 +46,16 @@
from string import ascii_letters, digits
from email import errors
+__all__ = ['decode_q',
+ 'encode_q',
+ 'decode_b',
+ 'encode_b',
+ 'len_q',
+ 'len_b',
+ 'decode',
+ 'encode',
+ ]
+
#
# Quoted Printable
#
@@ -60,7 +70,7 @@
# dict mapping bytes to their encoded form
-class QByteMap(dict):
+class _QByteMap(dict):
safe = b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii')
@@ -71,7 +81,7 @@
self[key] = "={:02X}".format(key)
return self[key]
-_q_byte_map = QByteMap()
+_q_byte_map = _QByteMap()
# In headers spaces are mapped to '_'.
_q_byte_map[ord(' ')] = '_'
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list