Discuss / Python / 一个类创造一个实力的时候,会先运行类的__int__函数

一个类创造一个实力的时候,会先运行类的__int__函数

Topic source

WALL_E91

#1 Created at ... [Delete] [Delete and Lock User]

class Student(object): count = 0 def init(self, name): self.name = name Student.count += 1


  • 1

Reply