Fredrik Lundh wrote:
Catherine Heathcote wrote:
If I create a new class inherited from another with a constructor, what
happens with the new class's constructer?
Python doesn't really have constructors; when you create an object,
Python first creates the object and then calls the __init__ method, if
available
To elaborate a bit on Fredrik's response, there is a sense in which
Python has constructors, but, to the extent it does, a constructor is
the __new__, __init__ pair. For immutables, everything happens in
__new__, for mutables, most things happen in the __init__ chain.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list