“超级”在Python中做什么?在以下几个方面有什么区别:class Child(SomeBaseClass):
def __init__(self):
super(Child, self).__init__()以及:class Child(SomeBaseClass):
def __init__(self):
SomeBaseClass.__init__(self)我见过super在只有单一继承的类中使用很多。我明白为什么您会在多重继承中使用它,但不清楚在这种情况下使用它有什么好处。
3 回答
![?](http://img1.sycdn.imooc.com/54585094000184e602200220-100-100.jpg)
哔哔one
TA贡献1854条经验 获得超8个赞
super()
super()
Child
添加回答
举报
0/150
提交
取消