From 6b4593e33887ca1dd2475aee2dd037cee4e33d9f Mon Sep 17 00:00:00 2001 From: Fred Drake Date: Tue, 22 May 2001 15:12:46 +0000 Subject: [PATCH] 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). --- Doc/lib/librfc822.tex | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Doc/lib/librfc822.tex b/Doc/lib/librfc822.tex index 56f6c744576..55ec5c2d52e 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: