经典类深度优先,新式类是广度优先
#深度优先和广度优先 #新式类基本都是广度优先 class A:#如果没有具体继承类默认继承类是object def test(self): print('A') class B(A): pass # def test(self): # print('B') class C(A): pass # def test(self): # print('C') class D(B): # def test(self): # print('D') pass class E(C): # def test(self): # print('E') pass class F(D,E):#新式类从左往右 #F-D-B不找A,然后回到右边从E-C-A---object # def test(self): # print('F') pass f1=F() f1.test() print(F.mro())#mro列表F-D-B不找A,然后回到右边从E-C-A---object