标签:self base 继承 class python基础 code elf span sel
class Base: def play(self): print(‘这是Base‘) class A(Base): def play(self): print(‘这是A‘) class B(Base): def play(self): print(‘这是B‘) class C(A,B): def play(self): super().play() #super(C,self).play() 两个写法,作用一样 #D.play() print(‘这是C‘) c = C()
标签:self base 继承 class python基础 code elf span sel
原文地址:http://www.cnblogs.com/yuebei/p/7101190.html