Doc error on super(cls,self)
dmq at gain.com
Sat Jun 12 15:36:46 CEST 2004
On 11 Jun 2004 21:04:40 -0700, michele.simionato at poste.it (Michele
>David MacQuigg <dmq at gain.com> wrote in message news:<pdtjc0pdc7l69jbankqe531s6dpfl8phdq at 4ax.com>...
>> I think there is a documentation error in both the Library Reference
>> section 2.1 and the Python 2.2 Quick Reference page 19. The
>> explanation for this function is:
>> super( type[, object-or-type])
>> Returns the superclass of type.
>Aha! Now I see why for a while in the past I thought 'super' was returning
>the superclass: I had read the documentation!
>The sentence you report here is clearly WRONG and misleading, since 'super'
>returns a 'super object' which is a descriptor acting more or less as a proxy
>to the methods in the MRO. 'super' by no means is returning the superclass.
>So please submit the documentation bug. If nobody has already done that,
>I will volunteer to write a tutorial on 'super', since it is rather tricky
>and terribly documented in the standard docs.
I will submit the bug report.
I think a tutorial would be very helpful. The only clear (but
lengthy) explanation I have found is GvR's paper at
http://python.org/2.2.3/descrintro.html#cooperation (see "Cooperative
methods and super" pp.14-18 in the printed version) I've tried to
condense this into a brief summary in my OOP chapter at
http://ece.arizona.edu/~edatools/Python/PythonOOP.doc (see "Super
Calls" on p.14-15). I could add your tutorial as an example or
exercise, or link to your website, if you have a relatively permanent
More information about the Python-list