"Robert" <webtour...@gmail.com> wrote
I have read quite a bit in the past 2 months, ( I have also looked at
codes)
At this point, I think I understand well what __init__() is and does -
But, I have yet to see this *specifically* spelled out about the the
__init__ method for a Class;
It is OPTIONAL, correct ?
Yes as are all metods. There is nothing very special about __init__
except that it is not called explicitly by users of the class. It could
have
been done as an explicit method as in Smalltalk or Objective C.
In these the instance creation paradigm is a two stage process
obj = [[class new] init]
In Python we get the init call for "free"
Alan G.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor