diff options
author | Raymond Hettinger <python@rcn.com> | 2005-08-21 11:26:14 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2005-08-21 11:26:14 (GMT) |
commit | a30616a88db1ccc481cd5c8e4b78652df5c0f8cf (patch) | |
tree | 77c9dd64f904c6e8fcbd0662f4bf60192c01f5e8 /Doc | |
parent | a710b331daee9e79ca90395feb6ce8c552e00568 (diff) | |
download | cpython-a30616a88db1ccc481cd5c8e4b78652df5c0f8cf.zip cpython-a30616a88db1ccc481cd5c8e4b78652df5c0f8cf.tar.gz cpython-a30616a88db1ccc481cd5c8e4b78652df5c0f8cf.tar.bz2 |
SF bug #1249837: container methods raise KeyError not IndexError
Minor clarification.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/ref/ref3.tex | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex index 6754c27..46388b2 100644 --- a/Doc/ref/ref3.tex +++ b/Doc/ref/ref3.tex @@ -1658,6 +1658,8 @@ If \var{key} is of an inappropriate type, \exception{TypeError} may be raised; if of a value outside the set of indexes for the sequence (after any special interpretation of negative values), \exception{IndexError} should be raised. +For mapping types, if \var{key} is missing (not in the container), +\exception{KeyError} should be raised. \note{\keyword{for} loops expect that an \exception{IndexError} will be raised for illegal indexes to allow proper detection of the end of the sequence.} |