]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
One more update related to the new get() and setdefault() methods on the
authorFred Drake <fdrake@acm.org>
Tue, 22 May 2001 22:00:40 +0000 (22:00 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 22 May 2001 22:00:40 +0000 (22:00 +0000)
Message object.

Doc/lib/librfc822.tex

index 55ec5c2d52e47b43ab55739f5da1f210ab1025c5..f0110eb156abd7a711478bd2f28c31e55ac8f1ed 100644 (file)
@@ -218,11 +218,12 @@ 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()} \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]}.  \class{Message} objects do not support the
-\method{clear()}, \method{copy()}, \method{popitem()}, or
+\code{\var{m}.setdefault(name\optional{, default})} act as expected,
+with the one difference that \method{get()} and \method{setdefault()}
+use an empty string as the default value.  \class{Message} instances
+also support the mapping writable interface \code{\var{m}[name] =
+value} and \code{del \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.)