MRO with multiple inheritance in python
问题 In the documentation on the Python webpage the method resolution order for classic classes in python is described as a depth-first left-to-right search. I tried to test this with this piece of code: class A(object): def __init__(self): print "Initialized A" class B(A): def test(): print "Initialized B" class C(A): def __init__(self): print "Initialized C" class D(B, C): def __init__(self): super(D, self).__init__() print "Initialized D" When I create an instance of object D: D() I get the