File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1095,8 +1095,9 @@ \subsection{Emulating sequence and mapping types\label{sequence-types}}
10951095
10961096\begin {methoddesc }[mapping object]{__getitem__}{self, key}
10971097Called to implement evaluation of \code {\var {self}[\var {key}]}.
1098- For a sequence types, the accepted keys should be integers. Note that
1099- the special interpretation of negative indices (if the class wishes to
1098+ For sequence types, the accepted keys should be integers and slice
1099+ objects.\obindex {slice} Note that
1100+ the special interpretation of negative indexes (if the class wishes to
11001101emulate a sequence type) is up to the \method {__getitem__()} method.
11011102If \var {key} is of an inappropriate type, \exception {TypeError} may be
11021103raised; if of a value outside the set of indexes for the sequence
You can’t perform that action at this time.
0 commit comments