class Student(object): count = 0 # 实例化对象时,自动调用init方法,类属性+1 def __int__(self,name): self.name = name Student.count += 1
Sign in to make a reply
却道天凉好个秋