Understanding __call__ with metaclasses [duplicate]
问题 This question already has an answer here : need to understand the flow of __init__, __new__ and __call__ (1 answer) Closed 2 years ago . From my understanding the __call__ method inside a class implements the function call operator, for example: class Foo: def __init__(self): print("I'm inside the __init__ method") def __call__(self): print("I'm inside the __call__ method") x = Foo() #outputs "I'm inside the __init__ method" x() #outputs "I'm inside the __call__ method" However, I'm going