On Jul 22, 12:26 pm, Catherine Heathcote
<[EMAIL PROTECTED]> wrote:
> If I create a new class inherited from another with a constructor, what
> happens with the new class's constructer?
> Thanks for your time.
Well, the __init__ method of the subclass is called, and from within
it you can call the superclass constructor.
Here is a sample code:
class A():
def __init__(self, bla):
#do some stuff here
class B(A):
def __init__(self, bla2):
#do some stuff here
A.__init__(self,bla)
--
http://mail.python.org/mailman/listinfo/python-list