幕布斯7119047
子类调用父类函数有以下方法:直接写类名调用用 super(type, obj).method(arg)方法调用。在类定义中调用本类的父类方法,可以直接用super().method(arg)123456789class A: def method(self, arg): pass class B(A): def method(self, arg): # A.method(self,arg) # 1 # super(B, self).method(arg) # 2 super().method(arg) # 3