封装
继承:
class ss(fatherclass):
继承的时候从左到右从,左侧的找完了才会去右侧找
如果有两边的顶部共同父类,最后才找父类
如果
class A: def gg(self): print('gg') self.f() class B(A): def pp(self): print('pp') class C: def f(self): print('f') class D(B,C): def dd(self): print(dd') a=D() a.gg() ---> gg f
super (son,self).__init__()
继承父类的方法