扫码关注官方订阅号
欢迎选择我的课程,让我们一起见证您的进步~~
你应该在覆写的 __init__ 函数里调用一下父类的 __init__:
__init__
python def __init__(self, client, text_contents): super().__init__() self.client = client self.text_contents = text_contents
python
def __init__(self, client, text_contents): super().__init__() self.client = client self.text_contents = text_contents
这在 Java 中是强制性的,在 Python 中则是灵活的。
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
扫描下载App
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你应该在覆写的
__init__
函数里调用一下父类的__init__
:这在 Java 中是强制性的,在 Python 中则是灵活的。