Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Ian Kelly
On Thu, Sep 1, 2011 at 3:04 AM, Michiel Overtoom wrote: > > On Sep 1, 2011, at 10:24, Hegedüs Ervin wrote: > >> On Thu, Sep 01, 2011 at 10:00:27AM +0200, Michiel Overtoom wrote: >>> Derive your class from object, >> >> why's that better than just create a simple class, without >> derive? > > Among

Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Michiel Overtoom
On Sep 1, 2011, at 10:24, Hegedüs Ervin wrote: > On Thu, Sep 01, 2011 at 10:00:27AM +0200, Michiel Overtoom wrote: >> Derive your class from object, > > why's that better than just create a simple class, without > derive? Amongst other things, fixes to the type system and the method resolution

Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Hegedüs Ervin
hello, On Thu, Sep 01, 2011 at 10:00:27AM +0200, Michiel Overtoom wrote: > On Sep 1, 2011, at 09:48, Amogh M S wrote: [...] > > class S: > >def _init_(self, name=None): > >self.name = name > > s = S("MyName") > > Two things: Derive your class from object, why's that better than just

Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Michiel Overtoom
On Sep 1, 2011, at 09:48, Amogh M S wrote: > Hey guys... > I think we have a problem with my _init_ method and the constructor > When I create a class and its _init_ method and try to create an object of it > outside the class, > Say, something like > > class S: >def _init_(self, name=None

Re: Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Peter Otten
Amogh M S wrote: > Hey guys... > I think we have a problem with my _init_ method and the constructor > When I create a class and its _init_ method and try to create an object of > it outside the class, > Say, something like > > class S: >def _init_(self, name=None): Your __init__() method ne

Constructors...BIIIIG PROBLEM!

2011-09-01 Thread Amogh M S
Hey guys... I think we have a problem with my _init_ method and the constructor When I create a class and its _init_ method and try to create an object of it outside the class, Say, something like class S: def _init_(self, name=None): self.name = name s = S("MyName") It says that the co