Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 34969:672e5f65172c 2.4
SF bug #1209671: dict.popitem documentation should mention empty dict case
| author | Raymond Hettinger <python@rcn.com> |
|---|---|
| date | Fri, 27 May 2005 10:45:14 +0000 |
| parents | 6bdc3426d411 |
| children | 5e511ddef48b |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Wed May 25 05:42:51 2005 +0000 +++ b/Doc/lib/libstdtypes.tex Fri May 27 10:45:14 2005 +0000 @@ -1398,7 +1398,8 @@ 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}
