diff options
author | R David Murray <rdmurray@bitdance.com> | 2012-05-27 16:39:54 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2012-05-27 16:39:54 (GMT) |
commit | 36432ea783a26cfbaecb05babb69ee31c00fe150 (patch) | |
tree | 3712307ea8ef89c78e911570a8a84331e5b3d8a4 /Lib/email | |
parent | 7e203498d1d90e943bc322b82a2e9a8e50da25c6 (diff) | |
download | cpython-36432ea783a26cfbaecb05babb69ee31c00fe150.zip cpython-36432ea783a26cfbaecb05babb69ee31c00fe150.tar.gz cpython-36432ea783a26cfbaecb05babb69ee31c00fe150.tar.bz2 |
Add '__all__' to _encoded_words and mark QByteMap as private.
Diffstat (limited to 'Lib/email')
-rw-r--r-- | 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 index 01fe42f..e9f6e20 100644 --- a/Lib/email/_encoded_words.py +++ b/Lib/email/_encoded_words.py @@ -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(' ')] = '_' |