摘要: python中@classmethod @staticmethod区别 Python中3种方式定义类方法, 常规方式, @classmethod修饰方式, @staticmethod修饰方式. 1.定义方式 普通的类方法foo()需要通过self参数隐式的传递当前类对象的实例。 @classmeth 阅读全文
posted @ 2019-08-11 21:28 liyinguo 阅读(581) 评论(0) 推荐(0) 编辑