If you have a class Foo
then:
Foo()
is the constructorFoo.__init__()
is the initializerFoo.__new__()
is the allocator
Construction of a Python object is simply allocation of a new instance followed by initialization of said instance.
If you have a class Foo
then:
Foo()
is the constructorFoo.__init__()
is the initializerFoo.__new__()
is the allocatorConstruction of a Python object is simply allocation of a new instance followed by initialization of said instance.