摘要: - 在初始化属性中的类 ```python #person_class.py class Person: population = 0 #初始化属性,用于计数 def __init__(self, myAge): self.age = myAge Person.population += 1 #计数 阅读全文
posted @ 2023-08-16 23:06 析木瑶光 阅读(26) 评论(0) 推荐(0)