Re: [Tutor] incomprehension in type of classes.

2005-04-23 Thread Kent Johnson
Cedric BRINER wrote: I'm not sure *why* there is this difference between the two types of classes, but there is... ah... I din't know that there was two kinds of classes. So you mean that, now the new style object should be like: class A(object): pass Yes, this is the recommended way to define

Re: [Tutor] incomprehension in type of classes.

2005-04-23 Thread Cedric BRINER
> >from (I): > > > >class CYear: > > def __init__(self, year): > > self.__year=year > > print str(self.__year) <<---(*) > > print 'dir of: '+str(dir(self)) > > print 'type of: '+str(type(self)) > > def __str__(self): > > return "we are in "+str(self.year) >

Re: [Tutor] incomprehension in type of classes.

2005-04-22 Thread Kent Johnson
Cedric BRINER wrote: in my python code I have changed some classes like the following from (I): class CYear: def __init__(self, year): self.__year=year print str(self.__year) <<---(*) print 'dir of: '+str(dir(self)) print 'type of: '+str(type(self)) def __s

[Tutor] incomprehension in type of classes.

2005-04-22 Thread Cedric BRINER
hello, I have 2 questions. the first one is maybe not directly related to python (it's about eric3), and the second oneis about what the command `type' give back for two instances in my python code I have changed some classes like the following from (I): class CYear: def __init__(self, yea