会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
yinguo
X86, BIOS/BMC, DRAM/IC, C/Python, Win/Linux, Web/Django
首页
新随笔
联系
管理
2019年8月11日
Py:python中@classmethod @staticmethod区别
摘要: python中@classmethod @staticmethod区别 Python中3种方式定义类方法, 常规方式, @classmethod修饰方式, @staticmethod修饰方式. 1.定义方式 普通的类方法foo()需要通过self参数隐式的传递当前类对象的实例。 @classmeth
阅读全文
posted @ 2019-08-11 21:28 liyinguo
阅读(581)
评论(0)
推荐(0)
编辑