]> granicus.if.org Git - python/commitdiff
Add '__all__' to _encoded_words and mark QByteMap as private.
authorR David Murray <rdmurray@bitdance.com>
Sun, 27 May 2012 16:39:54 +0000 (12:39 -0400)
committerR David Murray <rdmurray@bitdance.com>
Sun, 27 May 2012 16:39:54 +0000 (12:39 -0400)
Lib/email/_encoded_words.py

index 01fe42f5f3966ddca355b17c6cae499da4d72cef..e9f6e20bd7df8b6b79b28fd0ab288f4f737121c1 100644 (file)
@@ -46,6 +46,16 @@ import functools
 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 @@ def decode_q(encoded):
 
 
 # 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 @@ class QByteMap(dict):
             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(' ')] = '_'