On 20 Apr 2005 00:44:53 -0700, [EMAIL PROTECTED] wrote: >Guess i shouldn't think of the __init__(self) function as a constructor >then. >Thanks. Depends on what you think when you think "constructor" ;-) Read about both __new__ and __init__. The former is always necessary to create an object, and __init__ may take parameters to define intial state from its parameters, but __new__ does the whole job for immutables. I.e., "constructor" translates to combination of both if both are present, but __new__ must be always be there and come first. In general there are default methods inherited from object and/or type, the most primitive classes, so you don't have to define them except to customize for your purposes. At least, that's the way I think of it ;-)
Regards, Bengt Richter -- http://mail.python.org/mailman/listinfo/python-list