Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
36432ea7
Commit
36432ea7
authored
May 27, 2012
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add '__all__' to _encoded_words and mark QByteMap as private.
parent
7e203498
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
Lib/email/_encoded_words.py
Lib/email/_encoded_words.py
+12
-2
No files found.
Lib/email/_encoded_words.py
View file @
36432ea7
...
...
@@ -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
(
' '
)]
=
'_'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment