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
31575ce8
Commit
31575ce8
authored
Sep 21, 2000
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Note that __getitem__() may receive a slice object as the index;
reported by Detlef Lannert <lannert@uni-duesseldorf.de>.
parent
02997491
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
Doc/ref/ref3.tex
Doc/ref/ref3.tex
+3
-2
No files found.
Doc/ref/ref3.tex
View file @
31575ce8
...
...
@@ -1095,8 +1095,9 @@ returns zero is considered to be false in a Boolean context.
\begin{methoddesc}
[mapping object]
{__
getitem
__}{
self, key
}
Called to implement evaluation of
\code
{
\var
{
self
}
[
\var
{
key
}
]
}
.
For a sequence types, the accepted keys should be integers. Note that
the special interpretation of negative indices (if the class wishes to
For sequence types, the accepted keys should be integers and slice
objects.
\obindex
{
slice
}
Note that
the special interpretation of negative indexes (if the class wishes to
emulate a sequence type) is up to the
\method
{__
getitem
__
()
}
method.
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
...
...
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