"Reedick, Andrew" <[EMAIL PROTECTED]> writes:

>> Only if by "construct" you mean "allocate".  __init__ starts out
>> with an empty object and brings it to a valid state, therefore
>> "constructing" the object you end up with.  That operation is
>> exactly what other languages call a constructor.
>
> Nah.  Most other languages combine the constructor and an init
> function.

Maybe so, but the standard term for what Python calls __init__ is
still "constructor".

> Also, how can a constructor require 'self' as an argument...?
> __init__(self, ...)

Think of it as the equivalent of Java's and C++'s "this", except it's
explicit in the argument list.  "Explicit is better than implicit" and
all that.  :-)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to