]> granicus.if.org Git - python/commitdiff
Point out that the setdefault defaults the value to None. Inspired by
authorMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 16:41:34 +0000 (16:41 +0000)
committerMichael W. Hudson <mwh@python.net>
Sat, 7 Aug 2004 16:41:34 +0000 (16:41 +0000)
Michael Chermside's thinking about patch #748126 (the chief upshot of
which thinking was "reject it!").

Doc/lib/libstdtypes.tex

index ae1ba43503b432cfb23fb57f8d604ce3c39c03d3..01e800ad6fe414dace0d431ad0a38e396d8174c1 100644 (file)
@@ -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.