Re: [Tutor] Listing all of an instances variables

2005-10-10 Thread Kent Johnson
Matt Williams wrote: > Dear List, > > I'm stuck on trying to write a generic 'report' function: > > Class SomeClass: >def __init__(self,a,b): > self.a = a > self.b = b > >def report(self): > for i in dir(self): > print self.i > > > > > This is where I run

Re: [Tutor] Listing all of an instances variables

2005-10-08 Thread Karl Pflästerer
On 8 Okt 2005, [EMAIL PROTECTED] wrote: > Class SomeClass: >def __init__(self,a,b): > self.a = a > self.b = b > >def report(self): > for i in dir(self): > print self.i > > > > > This is where I run into problems: How do I return all of the variables > in an in