Commit c1b3ed52 authored by R. David Murray's avatar R. David Murray

Merged revisions 85130 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85130 | r.david.murray | 2010-09-30 22:08:02 -0400 (Thu, 30 Sep 2010) | 2 lines

  Fix a couple spelling errors in comments and delete redundant __len__ def.
........
parent cd4f7584
...@@ -98,7 +98,7 @@ class Message: ...@@ -98,7 +98,7 @@ class Message:
objects, otherwise it is a string. objects, otherwise it is a string.
Message objects implement part of the `mapping' interface, which assumes Message objects implement part of the `mapping' interface, which assumes
there is exactly one occurrance of the header per message. Some headers there is exactly one occurrence of the header per message. Some headers
do in fact appear multiple times (e.g. Received) and for those 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 you must use the explicit API to set or get all the headers. Not all of
the mapping methods are implemented. the mapping methods are implemented.
...@@ -289,7 +289,7 @@ class Message: ...@@ -289,7 +289,7 @@ class Message:
Return None if the header is missing instead of raising an exception. Return None if the header is missing instead of raising an exception.
Note that if the header appeared multiple times, exactly which Note that if the header appeared multiple times, exactly which
occurrance gets returned is undefined. Use get_all() to get all occurrence gets returned is undefined. Use get_all() to get all
the values matching a header field name. the values matching a header field name.
""" """
return self.get(name) return self.get(name)
...@@ -321,9 +321,6 @@ class Message: ...@@ -321,9 +321,6 @@ class Message:
for field, value in self._headers: for field, value in self._headers:
yield field yield field
def __len__(self):
return len(self._headers)
def keys(self): def keys(self):
"""Return a list of all the message's header field names. """Return a list of all the message's header field names.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment