一.实例创建 在创建实例时,调用__new__方法和__init__方法,这两个方法在没有定义时,是自动调用了object来实现的.python3默认创建的类是继承了object. class A(object): def __init__(self, *args, **kwargs): self.name, self.age, self.gender = args[:3] def __new__(cls, *args, **kwargs): print("__new__ has called.…