diff options
author | Michael W. Hudson <mwh@python.net> | 2004-08-07 16:41:34 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2004-08-07 16:41:34 (GMT) |
commit | 049e7aaa0f97e761b75f436b907894ca62ba4298 (patch) | |
tree | edf6924974165ba33093bd9ff2a915e9f498646d /Doc | |
parent | e8bedeb45b134e7ae033560353ba064738170cd3 (diff) | |
download | cpython-049e7aaa0f97e761b75f436b907894ca62ba4298.zip cpython-049e7aaa0f97e761b75f436b907894ca62ba4298.tar.gz cpython-049e7aaa0f97e761b75f436b907894ca62ba4298.tar.bz2 |
Point out that the setdefault defaults the value to None. Inspired by
Michael Chermside's thinking about patch #748126 (the chief upshot of
which thinking was "reject it!").
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libstdtypes.tex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index ae1ba43..01e800a 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1368,7 +1368,7 @@ provided and \var{k} is not in the map, \code{None} is returned. \item[(5)] \function{setdefault()} is like \function{get()}, except that if \var{k} is missing, \var{x} is both returned and inserted into -the dictionary as the value of \var{k}. +the dictionary as the value of \var{k}. \var{x} defaults to \var{None}. \item[(6)] \function{popitem()} is useful to destructively iterate over a dictionary, as often used in set algorithms. |