0
点赞
收藏
分享

微信扫一扫

python 引用父类super

一天清晨 2023-01-18 阅读 119

class Parent():
def __init__(self, name):
print(name)

class Son(Parent):
def __init__(self, name):
super().__init__(name)

s = Son(name="ccc")

举报

相关推荐

0 条评论