[Tutor] quirky multiple inheritance example!?

Alan Gauld alan.gauld at freenet.co.uk
Fri Feb 10 12:29:31 CET 2006


> It's worse than that - with MI if you call __init__() explicitly and the 
> base classes call super().__init__(), one of the base class __init__() 
> methods will be called twice. See http://fuhm.net/super-harmful/ for an 
> example.
>

Excellent link Kent. This just highlights how woefully inadequate the
official documentation for super() is! It has also confirmed my belief
that I'm better off sticking to explicit calls and worrying about diamond
lattice situations only when I need to (which is very rarely indeed!).

Its also confirmed that I did the right thing by ignoring super in my tutor!

Alan G 



More information about the Tutor mailing list