__new__, __init__사용 class A: def __new__(self): print('new') def __init__(self, x): print('init') wa = A() #new print(wa) #none __new__에서 인스턴스를 생성해 반환하지 않고 있으므로 __init__이 실행되지 않았을 뿐더러 wa는 None이다. 오류 1. __init__에 인자 x를 주었을 때 class AA(metaclass=type): #metaclass 속성에 type 따로 넣는 것 def __new__(cls): #생성 관련 부분 print('new') return super().__new__(cls) def __init__(self, x): #초기값 주는 부분 print('init') a =..