[Tutor] SubClassing

Sean Perry shaleh at speakeasy.net
Fri Feb 25 09:01:07 CET 2005


Ismael Garrido wrote:
> Sean Perry wrote:
> 
>> yep. call 'Parent.__init__(this, that)' then do 'self.new = new'
>>
>> def __init__(self, this, that, new):
>>     Parent.__init__(this, that)
>>     self.new = new
> 
> 
> Thanks.
> 
> Though it should be:
> def __init__(self, this, that, new):
>    Parent.__init__(self, this, that)  #note self
>    self.new = new
> 

been doing a bunch of C++ programming. C++ -> python I always forget 
about self. python -> c++ I always forget the semicolons (-:


More information about the Tutor mailing list