Calling parent class __init__ with multiple inheritance, what's the right way?
问题 Say I have a multiple inheritance scenario: class A(object): # code for A here class B(object): # code for B here class C(A, B): def __init__(self): # What's the right code to write here to ensure # A.__init__ and B.__init__ get called? There's two typical approaches to writing C 's __init__ : (old-style) ParentClass.__init__(self) (newer-style) super(DerivedClass, self).__init__() However, in either case, if the parent classes ( A and B ) don't follow the same convention, then the code will