Skip to content

Commit

Permalink
Point out that the setdefault defaults the value to None. Inspired by
Browse files Browse the repository at this point in the history
Michael Chermside's thinking about patch #748126 (the chief upshot of
which thinking was "reject it!").
  • Loading branch information
Michael W. Hudson committed Aug 7, 2004
1 parent e8bedeb commit 049e7aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Doc/lib/libstdtypes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ \subsection{Mapping Types \label{typesmapping}}

\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.
Expand Down

0 comments on commit 049e7aa

Please sign in to comment.