Useless Super In Multiple Inheritance?
in multiple inheritance how super() works? for example here I have Two init and I want to send args by super(): class LivingThings(object): def __init__(self, age ,name):
Solution 1:
super
works fine in multiple inheritance; that is in fact precisely what it is for. But for some reason you are calling it twice, with different arguments; that is not how it works.
Call it once. That calls the next method in the method resolution order. It is then that method's responibility to call super, to call the next method.
Please read Raymond Hettinger's classic article Super considered super.
Post a Comment for "Useless Super In Multiple Inheritance?"