Discuss / Python / super() 类怎么用的,以前没讲吧?

super() 类怎么用的,以前没讲吧?

Topic source

zx_sunrise

#1 Created at ... [Delete] [Delete and Lock User]

super(StringField, self)

子类调用父类的方法 class A(object): def add(self,x): pass class B(A): def add(self,x): super(B,self).add(x)


  • 1

Reply