diff Doc/lib/libstdtypes.tex @ 33003:b5dcfe7a4159 legacy-trunk

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!").
author Michael W. Hudson <mwh@python.net>
date Sat, 07 Aug 2004 16:41:34 +0000
parents 9b188158181f
children f27935b46985
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex	Sat Aug 07 16:38:40 2004 +0000
+++ b/Doc/lib/libstdtypes.tex	Sat Aug 07 16:41:34 2004 +0000
@@ -1368,7 +1368,7 @@
 
 \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.