[Tutor] __init__

eryk sun eryksun at gmail.com
Tue Aug 30 07:50:25 EDT 2016


On Tue, Aug 30, 2016 at 9:09 AM, Alan Gauld via Tutor <tutor at python.org> wrote:
> new() that sets up the memory then calls init(). So init is
> only used to initialise the object after it has been
> constructed.

__new__ and __init__ are called by the metaclass __call__ method.
__init_ is called if __new__ returns an instance of the class.


More information about the Tutor mailing list