diff options
author | Fred Drake <fdrake@acm.org> | 2001-05-22 14:36:30 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-05-22 14:36:30 (GMT) |
commit | 706314909b9fcdcdd46dadb389c6c32cdfbbcdb6 (patch) | |
tree | 64b1b27de02721ede4962bf10401b2f4663809aa | |
parent | b45032e62924959643676fc0313d866d5336fcc3 (diff) | |
download | cpython-706314909b9fcdcdd46dadb389c6c32cdfbbcdb6.zip cpython-706314909b9fcdcdd46dadb389c6c32cdfbbcdb6.tar.gz cpython-706314909b9fcdcdd46dadb389c6c32cdfbbcdb6.tar.bz2 |
Add some clarifications about the mapping interface presented by
rfc822.Message objects, based on comments from Barry.
-rw-r--r-- | Doc/lib/librfc822.tex | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/lib/librfc822.tex b/Doc/lib/librfc822.tex index 2f68bb8..56f6c74 100644 --- a/Doc/lib/librfc822.tex +++ b/Doc/lib/librfc822.tex @@ -211,13 +211,15 @@ there is no header matching \var{name}, or it is unparsable, return \code{None}. \end{methoddesc} -\class{Message} instances also support a read-only mapping interface. +\class{Message} instances also support a limited mapping interface. 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}.has_key(name)}, \code{\var{m}.keys()}, \code{\var{m}.values()} and \code{\var{m}.items()} act as expected -(and consistently). +(and consistently). \class{Message} instances also support the +mapping writable interface \code{\var{m}[name] = value} and \code{del +\var{m}[name]}. Finally, \class{Message} instances have two public instance variables: |