[Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.50,1.51
Fred L. Drake
python-dev@python.org
Wed, 20 Sep 2000 22:28:28 -0700
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory slayer.i.sourceforge.net:/tmp/cvs-serv28749/ref
Modified Files:
ref3.tex
Log Message:
Note that __getitem__() may receive a slice object as the index;
reported by Detlef Lannert <lannert@uni-duesseldorf.de>.
Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -r1.50 -r1.51
*** ref3.tex 2000/09/19 18:21:25 1.50
--- ref3.tex 2000/09/21 05:28:26 1.51
***************
*** 1096,1101 ****
\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
emulate a sequence type) is up to the \method{__getitem__()} method.
If \var{key} is of an inappropriate type, \exception{TypeError} may be
--- 1096,1102 ----
\begin{methoddesc}[mapping object]{__getitem__}{self, key}
Called to implement evaluation of \code{\var{self}[\var{key}]}.
! 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