Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98cfab6

Browse files
committed
One more update related to the new get() and setdefault() methods on the
Message object.
1 parent fa77e1a commit 98cfab6

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

Doc/lib/librfc822.tex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,12 @@ \subsection{Message Objects \label{message-objects}}
218218
\code{\var{m}.get(name\optional{, deafult})},
219219
\code{\var{m}.has_key(name)}, \code{\var{m}.keys()},
220220
\code{\var{m}.values()} \code{\var{m}.items()}, and
221-
\code{\var{m}.setdefault(name\optional{, default})} act as expected
222-
(and consistently). \class{Message} instances also support the
223-
mapping writable interface \code{\var{m}[name] = value} and \code{del
224-
\var{m}[name]}. \class{Message} objects do not support the
225-
\method{clear()}, \method{copy()}, \method{popitem()}, or
221+
\code{\var{m}.setdefault(name\optional{, default})} act as expected,
222+
with the one difference that \method{get()} and \method{setdefault()}
223+
use an empty string as the default value. \class{Message} instances
224+
also support the mapping writable interface \code{\var{m}[name] =
225+
value} and \code{del \var{m}[name]}. \class{Message} objects do not
226+
support the \method{clear()}, \method{copy()}, \method{popitem()}, or
226227
\method{update()} methods of the mapping interface. (Support for
227228
\method{.get()} and \method{.setdefault()} was only added in Python
228229
2.2.)

0 commit comments

Comments
 (0)