Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 18085:7e459fb3c332 legacy-trunk
Fixed reference to table notes for {}.keys() and {}.items() -- these
references did not get updated when the notes were renumbered in a
previous update.
This fixes SF bug #432208.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 12 Jun 2001 03:31:56 +0000 |
| parents | 178bedf9536d |
| children | bc05a95242a3 |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Tue Jun 12 01:22:22 2001 +0000 +++ b/Doc/lib/libstdtypes.tex Tue Jun 12 03:31:56 2001 +0000 @@ -930,11 +930,11 @@ \lineiii{\var{a}.items()} {a copy of \var{a}'s list of (\var{key}, \var{value}) pairs} {(3)} - \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(2)} + \lineiii{\var{a}.keys()}{a copy of \var{a}'s list of keys}{(3)} \lineiii{\var{a}.update(\var{b})} {\code{for k in \var{b}.keys(): \var{a}[k] = \var{b}[k]}} {(4)} - \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(2)} + \lineiii{\var{a}.values()}{a copy of \var{a}'s list of values}{(3)} \lineiii{\var{a}.get(\var{k}\optional{, \var{x}})} {\code{\var{a}[\var{k}]} if \code{\var{k} in \var{a}}, else \var{x}} @@ -969,8 +969,8 @@ \method{keys()} and \method{values()} are called with no intervening modifications to the dictionary, the two lists will directly correspond. This allows the creation of \code{(\var{value}, -\var{key})} pairs using \function{map()}: \samp{pairs = map(None, -\var{a}.values(), \var{a}.keys())}. +\var{key})} pairs using \function{zip()}: \samp{pairs = +zip(\var{a}.values(), \var{a}.keys())}. \item[(4)] \var{b} must be of the same type as \var{a}.
