Python self 参数
单选题 中等
题目
什么做 `self` 参数 in Python 方法 refer 到?
提示
self 是 conventional name for 首先参数的 实例方法.
解释
self refers 到 current 实例的 类. 当你 call obj.方法(), Python 通过 obj as 首先实参到 方法. 它允许方法到 access 实例 attributes and other 方法 on 相同对象.
相关资源
相关课程
- 类 and 对象
self 参数.
查阅不认识的术语
新手友好的术语表用大白话解释编程术语——变量、函数、DOM、Promise 等等。
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。
动手做项目
通过引导式项目应用所学,含起始代码与解决方案。