Calling __init__ with multiple inheritance
jfj at freemail.gr
Tue Mar 29 05:27:42 CEST 2005
Peter Otten wrote:
> Here is an alternative approach that massages the initializer signatures a
> bit to work with super() in a multiple-inheritance environment:
> super(Father, self).__init__(p_father=p_father, **more)
Is there any advantage using super in this case?
I think the case Father.__init__ (self, params) is simpler
and does the job perfectly well.
super seems to be needed in "Dynamic Inheritance" cases where
we don't know an object's bases and there are comlicated mro issues!
More information about the Python-list