class A:
pass
class B(A):
pass
class C(A):
pass
class D(C, B):
pass
if __name__ == '__main__':
import inspect
print(inspect.getmro(D))
class A(object):
pass
class B(A):
pass
class C(A):
pass
class D(C, B):
pass
if __name__ == '__main__':
print(D.__mro__)
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |