diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-22 15:12:46 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-22 15:12:46 (GMT) |
commit | 6b4593e33887ca1dd2475aee2dd037cee4e33d9f (patch) | |
tree | 1c78d7383bcd7b8b57b0cece6677d47d0b696adf /Doc/lib | |
parent | cf71fefa59f50f31c2d8d49dcb75033a1651a0d7 (diff) | |
download | cpython-6b4593e33887ca1dd2475aee2dd037cee4e33d9f.zip cpython-6b4593e33887ca1dd2475aee2dd037cee4e33d9f.tar.gz cpython-6b4593e33887ca1dd2475aee2dd037cee4e33d9f.tar.bz2 |
Update to add get() and setdefault() as supported mapping operations, and
add a list of the mapping methods which are not supported (per Barry's
comments).
Diffstat (limited to 'Doc/lib')
-rw-r--r-- | Doc/lib/librfc822.tex | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Doc/lib/librfc822.tex b/Doc/lib/librfc822.tex index 56f6c74..55ec5c2 100644 --- a/Doc/lib/librfc822.tex +++ b/Doc/lib/librfc822.tex @@ -215,11 +215,17 @@ there is no header matching \var{name}, or it is unparsable, return In particular: \code{\var{m}[name]} is like \code{\var{m}.getheader(name)} but raises \exception{KeyError} if there is no matching header; and \code{len(\var{m})}, +\code{\var{m}.get(name\optional{, deafult})}, \code{\var{m}.has_key(name)}, \code{\var{m}.keys()}, -\code{\var{m}.values()} and \code{\var{m}.items()} act as expected +\code{\var{m}.values()} \code{\var{m}.items()}, and +\code{\var{m}.setdefault(name\optional{, default})} act as expected (and consistently). \class{Message} instances also support the mapping writable interface \code{\var{m}[name] = value} and \code{del -\var{m}[name]}. +\var{m}[name]}. \class{Message} objects do not support the +\method{clear()}, \method{copy()}, \method{popitem()}, or +\method{update()} methods of the mapping interface. (Support for +\method{.get()} and \method{.setdefault()} was only added in Python +2.2.) Finally, \class{Message} instances have two public instance variables: |