On 30/08/16 12:50, eryksun wrote:
On Tue, Aug 30, 2016 at 9:09 AM, Alan Gauld via Tutor <tutor@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.
Quite so, but I didn't want to bend brains too much
by mentioning metaclasses! They are confusing enough
for experienced programmers let alone the typical
tutor subscriber!
Alan G
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor