Builtn super() function. How to use it with multiple inheritance? And why should I use it at all?
Gregory Ewing
greg.ewing at canterbury.ac.nz
Sat Jul 31 21:18:04 EDT 2010
Ian Kelly wrote:
> super(type[, object-or-type])
>
> ...
>
> The __mro__ attribute of the type lists the method resolution
> search order used by both getattr() and super(). The attribute is
> dynamic and can change whenever the inheritance hierarchy is updated.
That explanation does seem to be rather confusing. It would
certainly confuse *me* if I didn't already know what super()
did.
+1 on getting this part of the docs re-written to be several
times clearer.
--
Greg
More information about the Python-list
mailing list