类方法,静态方法
摘要:
class lianxi(): aa='this is text' #类属性 def test(self,name): #普通方法 print(self.aa) @classmethod def lei(cls): #类方法 print(cls.aa) @staticmethod def st(aa 阅读全文
posted @ 2019-12-16 22:54 星空6 阅读(249) 评论(0) 推荐(0)
posted @ 2019-12-16 22:54 星空6 阅读(249) 评论(0) 推荐(0)
posted @ 2019-12-16 17:26 星空6 阅读(452) 评论(0) 推荐(0)
posted @ 2019-12-16 11:56 星空6 阅读(520) 评论(0) 推荐(0)
posted @ 2019-12-16 11:30 星空6 阅读(277) 评论(0) 推荐(0)
posted @ 2019-12-16 10:27 星空6 阅读(1083) 评论(0) 推荐(0)