Re: Question about inheritence

2008-07-24 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Fredrik Lundh wrote: > Python doesn't really have constructors; when you create an object, > Python first creates the object and then calls the __init__ method, if > available That's the usual meaning of "constructor". It doesn't actually "construct" the object, it

Re: Question about inheritence

2008-07-22 Thread Scott David Daniels
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__ meth

Re: Question about inheritence

2008-07-22 Thread Fredrik Lundh
Catherine Heathcote wrote: If I create a new class inherited from another with a constructor, what happens with the new class's constructer? assuming that you mean "is it called or not?": Python doesn't really have constructors; when you create an object, Python first creates the object and

Re: Question about inheritence

2008-07-22 Thread Jordan
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

Re: Question about inheritence

2008-07-22 Thread Catherine Heathcote
On Tue, 22 Jul 2008 09:35:58 -0700, Matimus wrote: > On Jul 22, 9:26 am, 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. > > Nothing, unless you call i

Re: Question about inheritence

2008-07-22 Thread Matimus
On Jul 22, 9:26 am, 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. Nothing, unless you call it in your constructor. class Base(object): def __init__(self)

Question about inheritence

2008-07-22 Thread Catherine Heathcote
If I create a new class inherited from another with a constructor, what happens with the new class's constructer? Thanks for your time. -- http://mail.python.org/mailman/listinfo/python-list