]> granicus.if.org Git - python/commitdiff
SF bug #805304: super instances don't support item assignment
authorRaymond Hettinger <python@rcn.com>
Tue, 17 Aug 2004 02:21:45 +0000 (02:21 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 17 Aug 2004 02:21:45 +0000 (02:21 +0000)
Document a nuance of super().  It is designed to work well with dotted
attribute lookup but not with equivalent implicit lookups using operators
or statements.

Doc/lib/libfuncs.tex

index 6d41e1d0e432e8191dc91fb74d5199f0c95cb011..1130eb1688a39f54b06cc2639556b6e74e21bcd7 100644 (file)
@@ -996,6 +996,12 @@ class C(B):
     def meth(self, arg):
         super(C, self).meth(arg)
 \end{verbatim}
+
+  Note that \function{super} is implemented as part of the binding process for
+  explicit dotted attribute lookups such as
+  \samp{super(C, self).__getitem__(name)}.  Accordingly, \function{super} is
+  undefined for implicit lookups using statements or operators such as
+  \samp{super(C, self)[name]}.
 \versionadded{2.2}
 \end{funcdesc}