super python
时间: 2023-10-17 20:27:39 浏览: 85
super()是Python中的一个内置函数,用于调用父类的方法。它可以简单地理解为执行父类的__init__函数,当在子类中重写了父类的方法时,使用super()可以在子类中调用父类的方法。在多重继承的情况下,super()可以确保父类的方法按照正确的顺序被调用。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [python中的super是什么?](https://blog.csdn.net/baidu_37157624/article/details/123676212)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* [Python super()方法原理详解](https://download.csdn.net/download/weixin_38616505/12853743)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文