[Tutor] quirky multiple inheritance example!?
Alan Gauld
alan.gauld at freenet.co.uk
Thu Feb 9 10:48:35 CET 2006
>> The problem is that super appears to only work with single inheritance.
> That's ironic - super() is intended to ease some of the problems with
> multiple inheritance especially diamond patterns. Some docs are here:
> http://www.python.org/2.2.3/descrintro.html#cooperation
>
> The problem with the OP is that not all the classes involved use super().
I tried that. Before posting I went back and reread the super docs and
tried building an MI lattice but, whatever I did, super only ever called the
first listed superclass. If it had a super it called its superclass but the
second superclasss never got initialised so far as I could tell!
Alan G.
More information about the Tutor
mailing list