1、多继承(super().__init__())、*args和**kwargs、
https://blog.csdn.net/xiaoqiangclub/article/details/104837537
2、python中super().__init__()
3、
我们尝试下面代码,加入super(A, self).__init__()时调用A的父类Root的属性和方法(方法里对Root数据进行二次操作)
class Root(object):
def __init__(self):
self.x = '这是属性'
def fun(self):
print(self.x)
print('这是方法')
class A(Root):
def __init__(self):
super(A,self).__init__()
print('实例化时执行')
test = A() # 实例化类
test.fun() # 调用方法
test.x # 调用属性
结果输出如下
实例化时执行
这是属性
这是方法
————————————————
4、
https://www.runoob.com/w3cnote/python-super-detail-intro.html