summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2002-05-12 03:09:25 (GMT)
committerRaymond Hettinger <python@rcn.com>2002-05-12 03:09:25 (GMT)
commit94153096f5bb3dd19989d83ffbc38f140828ae3a (patch)
tree1e9cf3e8c458b02387d1b65eb234ace6818497ba /Doc
parent59518b04d5db9905a847b879fc164f92dbb458ea (diff)
downloadcpython-94153096f5bb3dd19989d83ffbc38f140828ae3a.zip
cpython-94153096f5bb3dd19989d83ffbc38f140828ae3a.tar.gz
cpython-94153096f5bb3dd19989d83ffbc38f140828ae3a.tar.bz2
Closes SF patch: 552468.
Type class unification invalidated the statement: x.__getitem__[i] is not equivalent to x[i].
Diffstat (limited to 'Doc')
-rw-r--r--Doc/ref/ref3.tex6
1 files changed, 2 insertions, 4 deletions
diff --git a/Doc/ref/ref3.tex b/Doc/ref/ref3.tex
index 3e5b2c3..f1fecf0 100644
--- a/Doc/ref/ref3.tex
+++ b/Doc/ref/ref3.tex
@@ -897,10 +897,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