python 方法 函数 区别

method A function which is defined inside a class body. If called as an attribute of an instance of that class, the method will get the instance object as its first argument (which is usually called self).中文大概就是method相当于类函数,其第一个参数是self 这是官方文档里的。要...
python 方法 函数 区别
method
A function which is defined inside a class body. If called as an attribute of an instance of that class, the method will get the instance object as its first argument (which is usually called self).
中文大概就是method相当于类函数,其第一个参数是self
这是官方文档里的。要多看文档啊2011-04-23
没区别2011-04-23
mengvlog 阅读 6 次 更新于 2025-07-19 20:20:06 我来答关注问题0
檬味博客在线解答立即免费咨询

Python相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部