diff options
author | Raymond Hettinger <python@rcn.com> | 2005-05-27 10:43:55 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-05-27 10:43:55 (GMT) |
commit | 631bfe602f20c7d0e34b79be604c6040f8691c75 (patch) | |
tree | 99372120fdf104c5aafaee3ca4c05f847fe53f41 | |
parent | 2f475a7bc848dced5d57414c45d929d1859d5505 (diff) | |
download | cpython-631bfe602f20c7d0e34b79be604c6040f8691c75.zip cpython-631bfe602f20c7d0e34b79be604c6040f8691c75.tar.gz cpython-631bfe602f20c7d0e34b79be604c6040f8691c75.tar.bz2 |
SF bug #1209671: dict.popitem documentation should mention empty dict case
-rw-r--r-- | Doc/lib/libstdtypes.tex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex index fd58614..7ebdc63 100644 --- a/Doc/lib/libstdtypes.tex +++ b/Doc/lib/libstdtypes.tex @@ -1398,7 +1398,8 @@ that if \var{k} is missing, \var{x} is both returned and inserted into 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. +over a dictionary, as often used in set algorithms. If the dictionary +is empty, calling \function{popitem()} raises a \exception{KeyError}. \item[(7)] \function{fromkeys()} is a class method that returns a new dictionary. \var{value} defaults to \code{None}. \versionadded{2.3} |