diff options
author | Raymond Hettinger <python@rcn.com> | 2004-08-17 02:21:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-08-17 02:21:45 (GMT) |
commit | cb40ba1f5e5913c8f9ff807f419569301c23008f (patch) | |
tree | 3502fc9151b88c367c7c190221d362c1a47a6d4d /Doc | |
parent | 6c06cd5ff9dbf940c5907eb4d8992e7ee857b1d7 (diff) | |
download | cpython-cb40ba1f5e5913c8f9ff807f419569301c23008f.zip cpython-cb40ba1f5e5913c8f9ff807f419569301c23008f.tar.gz cpython-cb40ba1f5e5913c8f9ff807f419569301c23008f.tar.bz2 |
SF bug #805304: super instances don't support item assignment
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.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libfuncs.tex | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 6d41e1d..1130eb1 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -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} |