Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Jojo Mwebaze
Thanks Guys! Works perfect cheers On Mon, Sep 27, 2010 at 1:01 PM, Wayne Werner wrote: > In addition it only works for new style classes. > > -wayne > > On 9/27/10, Lie Ryan wrote: > > On 09/27/10 09:45, Jojo Mwebaze wrote: > >> Hey Tutor, > >> > >> Seems a small issue but this has been p

Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Jojo Mwebaze
Thanks Guys! Works perfect cheers On Mon, Sep 27, 2010 at 1:01 PM, Wayne Werner wrote: > In addition it only works for new style classes. > > -wayne > > On 9/27/10, Lie Ryan wrote: > > On 09/27/10 09:45, Jojo Mwebaze wrote: > >> Hey Tutor, > >> > >> Seems a small issue but this has been p

Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Wayne Werner
In addition it only works for new style classes. -wayne On 9/27/10, Lie Ryan wrote: > On 09/27/10 09:45, Jojo Mwebaze wrote: >> Hey Tutor, >> >> Seems a small issue but this has been playing for a while now, what am i >> doing wrong here? >> > > super() without argument only works for Python 3.

Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Lie Ryan
On 09/27/10 09:45, Jojo Mwebaze wrote: > Hey Tutor, > > Seems a small issue but this has been playing for a while now, what am i > doing wrong here? > super() without argument only works for Python 3. In Python 2.x, you have to pass to super your class name and your class instance, i.e.: Class

Re: [Tutor] super.__init__() arguments

2010-09-26 Thread Hugo Arts
On Mon, Sep 27, 2010 at 1:45 AM, Jojo Mwebaze wrote: > Hey Tutor, > Seems a small issue but this has been playing for a while now, what am i > doing wrong here? > Take an Example > Class Point: >    def __init__(self, x=0, y=0): >      self.x = x >      self.y = y > Class Circle(Point): >     def

[Tutor] super.__init__() arguments

2010-09-26 Thread Jojo Mwebaze
Hey Tutor, Seems a small issue but this has been playing for a while now, what am i doing wrong here? Take an Example Class Point: def __init__(self, x=0, y=0): self.x = x self.y = y Class Circle(Point): def __init__(self, radius=0, x=0, y=0): super().__init__(x, y)