Doc error on super(cls,self)

Michele Simionato michele.simionato at poste.it
Sat Jun 12 00:04:40 EDT 2004


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.

                     Michele Simionato



More information about the Python-list mailing list