Am Freitag, den 21.03.2008, 21:48 -0500 schrieb tiger12506: Actually, super returns all base classes, all in it's own time.
Basically, every class has a member __mro__, that contains a consistently ordered list of classes. super needs the class from where it is being called to locate the right place in the __mro__ and to hand you a wrapper around self for the next base class in this list. This way, if all classes use super, they can cooperativly call all implementations of a given method. That's the theory. In practice there are a number of pitfalls which makes super problematic. ;) Andreas > Also, does anyone want to clarify? I thought that super() only return one of > the base classes and was frowned upon for objects using multiple > inheritance??? > _______________________________________________ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor