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
d2c310f0
Commit
d2c310f0
authored
Oct 01, 2010
by
R. David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a couple spelling errors in comments and delete redundant __len__ def.
parent
0f476d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Lib/email/message.py
Lib/email/message.py
+2
-5
No files found.
Lib/email/message.py
View file @
d2c310f0
...
...
@@ -98,7 +98,7 @@ class Message:
objects, otherwise it is a string.
Message objects implement part of the `mapping' interface, which assumes
there is exactly one occurr
a
nce of the header per message. Some headers
there is exactly one occurr
e
nce of the header per message. Some headers
do in fact appear multiple times (e.g. Received) and for those headers,
you must use the explicit API to set or get all the headers. Not all of
the mapping methods are implemented.
...
...
@@ -290,7 +290,7 @@ class Message:
Return None if the header is missing instead of raising an exception.
Note that if the header appeared multiple times, exactly which
occurr
a
nce gets returned is undefined. Use get_all() to get all
occurr
e
nce gets returned is undefined. Use get_all() to get all
the values matching a header field name.
"""
return
self
.
get
(
name
)
...
...
@@ -322,9 +322,6 @@ class Message:
for
field
,
value
in
self
.
_headers
:
yield
field
def
__len__
(
self
):
return
len
(
self
.
_headers
)
def
keys
(
self
):
"""Return a list of all the message's header field names.
...
...
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