Re: New subclass vs option in __init__

2007-12-07 Thread Carl Banks
On Dec 7, 9:36 am, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-12-07, Carl Banks <[EMAIL PROTECTED]> wrote: > > > On Dec 6, 11:56 am, "Kurt Smith" <[EMAIL PROTECTED]> wrote: > >> It would seem that there are cases where one would be > >> preferable over the other: a) when the new behavior wou

Re: New subclass vs option in __init__

2007-12-07 Thread Neil Cerutti
On 2007-12-07, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 6, 11:56 am, "Kurt Smith" <[EMAIL PROTECTED]> wrote: >> It would seem that there are cases where one would be >> preferable over the other: a) when the new behavior would >> modify a large portion of the existing subclass, making a new >

Re: New subclass vs option in __init__

2007-12-07 Thread Carl Banks
On Dec 6, 11:56 am, "Kurt Smith" <[EMAIL PROTECTED]> wrote: > It would seem that there are cases where one would be preferable over > the other: a) when the new behavior would modify a large portion of > the existing subclass, making a new subclass would be ideal; b) when > the new behavior changes

Re: New subclass vs option in __init__

2007-12-06 Thread Bruno Desthuilliers
Kurt Smith a écrit : > Hi List: > > Class inheritance noob here. > > For context, I have the following base class and subclass: > > class Base(object): > def __init__(self, val): > self.val = val > > class Derived1(Base): > def __init__(self, val): > super(Derived1, self

New subclass vs option in __init__

2007-12-06 Thread Kurt Smith
Hi List: Class inheritance noob here. For context, I have the following base class and subclass: class Base(object): def __init__(self, val): self.val = val class Derived1(Base): def __init__(self, val): super(Derived1, self).__init__(val) I'm curious as to other's thou