摘要: @classmethod(类方法) class A(object): bar = 1 def func1(self): print("foo") @classmethod def func2(cls): print("func2") print(cls.bar) cls().func1() A.fu 阅读全文
posted @ 2023-07-17 18:45 西瓜汁拌面 阅读(139) 评论(0) 推荐(0) 编辑