Skip to content

Commit 36432ea

Browse files
committed
Add '__all__' to _encoded_words and mark QByteMap as private.
1 parent 7e20349 commit 36432ea

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Lib/email/_encoded_words.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@
4646
from string import ascii_letters, digits
4747
from email import errors
4848

49+
__all__ = ['decode_q',
50+
'encode_q',
51+
'decode_b',
52+
'encode_b',
53+
'len_q',
54+
'len_b',
55+
'decode',
56+
'encode',
57+
]
58+
4959
#
5060
# Quoted Printable
5161
#
@@ -60,7 +70,7 @@ def decode_q(encoded):
6070

6171

6272
# dict mapping bytes to their encoded form
63-
class QByteMap(dict):
73+
class _QByteMap(dict):
6474

6575
safe = b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii')
6676

@@ -71,7 +81,7 @@ def __missing__(self, key):
7181
self[key] = "={:02X}".format(key)
7282
return self[key]
7383

74-
_q_byte_map = QByteMap()
84+
_q_byte_map = _QByteMap()
7585

7686
# In headers spaces are mapped to '_'.
7787
_q_byte_map[ord(' ')] = '_'

0 commit comments

Comments
 (0)