Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d36de78c
Commit
d36de78c
authored
Aug 21, 2005
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SF bug #1249837: container methods raise KeyError not IndexError
Minor clarification.
parent
cc5b79fc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
Doc/ref/ref3.tex
Doc/ref/ref3.tex
+2
-0
No files found.
Doc/ref/ref3.tex
View file @
d36de78c
...
@@ -1658,6 +1658,8 @@ If \var{key} is of an inappropriate type, \exception{TypeError} may be
...
@@ -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
raised; if of a value outside the set of indexes for the sequence
(after any special interpretation of negative values),
(after any special interpretation of negative values),
\exception
{
IndexError
}
should be raised.
\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
\note
{
\keyword
{
for
}
loops expect that an
\exception
{
IndexError
}
will be raised for illegal indexes to allow
\exception
{
IndexError
}
will be raised for illegal indexes to allow
proper detection of the end of the sequence.
}
proper detection of the end of the sequence.
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment