[Python-Dev] Things to Know About Super
Greg Ewing
greg.ewing at canterbury.ac.nz
Wed Aug 27 09:54:47 CEST 2008
Phillip J. Eby wrote:
> ISTR pointing out on more than one occasion that a major use case for
> co-operative super() is in the implementation of metaclasses. The
> __init__ and __new__ signatures are fixed, multiple inheritance is
> possible, and co-operativeness is a must
Do you have a real-life example of this where multiple
inheritance is actually used?
A non-contrived example or two would be a good thing to
have in tutorials etc. where super() is discussed. It
would help to convey the kinds of situations in which
use of super() is and is not appropriate.
--
Greg
More information about the Python-Dev
mailing list