文章分类 -  Python

摘要:class Test: stc_attr = 1 def __init__(self,attr1,attr2): self.attr1 = attr1 self.attr2 = attr2 在类Test中,stc_attr是属于类Test的静态变量,attr1和attr2是属于对象的变量。并且通过类 阅读全文
posted @ 2020-08-14 14:52 cknds 阅读(22) 评论(0) 推荐(0)