Re: extender method

2006-07-26 Thread Paul McGuire
"Chris Lambacher" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, Jul 26, 2006 at 09:21:10AM -0700, [EMAIL PROTECTED] wrote: > > 'Learning Python' by Lutz and Ascher (excellent book by the way) > > explains that a subclass can call its superclass constructor as > > follows: >

RE: extender method

2006-07-26 Thread jon cashman
class S: def __init__(self, **k): self.data = k class E(S): def __init__(self, **k): S.__init__(self, **k) x = E(a=1) print x.data {'a': 1} From: [EMAIL PROTECTED] To: python-list@python.org Subject: extender method Date: 26 Jul 2006 09:21:10 -070

Re: extender method

2006-07-26 Thread Simon Forman
[EMAIL PROTECTED] wrote: > 'Learning Python' by Lutz and Ascher (excellent book by the way) > explains that a subclass can call its superclass constructor as > follows: > > class Super: >def method(self): ># do stuff > > class Extender(Super): >def method(self): >Super.method(self)

Re: extender method

2006-07-26 Thread Chris Lambacher
On Wed, Jul 26, 2006 at 09:21:10AM -0700, [EMAIL PROTECTED] wrote: > 'Learning Python' by Lutz and Ascher (excellent book by the way) > explains that a subclass can call its superclass constructor as > follows: > > class Super: >def method(self): ># do stuff > > class Extender(Super): >

Re: extender method

2006-07-26 Thread Bruno Desthuilliers
[EMAIL PROTECTED] wrote: > 'Learning Python' by Lutz and Ascher (excellent book by the way) > explains that a subclass can call its superclass constructor as > follows: > (snip) > > Now, this is fine using the above code. Where I'm struggling is with > argument passing. The following, for exampl