# 子类继承多个父类,拥有所有父类的属性和方法
class Father():
def testA(self):
print("我是father");
class Mother:
def testB(self):
print("我是mother");
class Son(Father,Mother):
def test(self):
print("我是儿子")
s=Son();
s.test();
s.testA();
s.testB()
print(Son.__mro__)
print(dir(s));
结果: