Basic inheritance question

Paul Hankin paul.hankin at gmail.com
Sat Jan 5 05:37:53 EST 2008


On Jan 5, 10:31 am, MartinRineh... at gmail.com wrote:
> ...
> class code:
>     def __init__( self, start, stop ):
>         startLoc = start
>         stopLoc = stop
> ...

You've forgotten the explicit self.
     def __init__( self, start, stop ):
         self.startLoc = start
         self.stopLoc = stop

--
Paul Hankin



More information about the Python-list mailing list