新式类的多继承遵循C3算法
class X: pass class S(X): pass class A(X): pass class B(S): pass class C(A): pass class D(B): pass class E(C): pass class F(D, E, B): pass f1 = F() print(F.mro()) # [<class '__main__.F'>, <class '__main__.D'>, <class '__main__.E'>, <class '__main__.B'>, <class '__main__.C'>, <class '__main__.A'>, <class 'object'>] # 新式类多继承
方法:
来源:https://www.cnblogs.com/tanxu05/p/10039927.html