]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport ver 1.88 correction noting that lists now support .__getitem__().
authorRaymond Hettinger <python@rcn.com>
Mon, 13 May 2002 07:55:24 +0000 (07:55 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 13 May 2002 07:55:24 +0000 (07:55 +0000)
Closes SF bug 548874 and patch 552468.

Doc/ref/ref3.tex

index 8da36919baba85037875a33d0e225bf03381728e..2f995d73a877afd0f52c9321dcba48264a9d813e 100644 (file)
@@ -882,10 +882,8 @@ syntax (such as arithmetic operations or subscripting and slicing) by
 defining methods with special names.  For instance, if a class defines
 a method named \method{__getitem__()}, and \code{x} is an instance of
 this class, then \code{x[i]} is equivalent to
-\code{x.__getitem__(i)}.  (The reverse is not true --- if \code{x} is
-a list object, \code{x.__getitem__(i)} is not equivalent to
-\code{x[i]}.)  Except where mentioned, attempts to execute an
-operation raise an exception when no appropriate method is defined.
+\code{x.__getitem__(i)}.  Except where mentioned, attempts to execute
+an operation raise an exception when no appropriate method is defined.
 \withsubitem{(mapping object method)}{\ttindex{__getitem__()}}
 
 When implementing a class that emulates any built-in type, it is