Re: Printing the arguments of an attribute in a class

2010-02-28 Thread Arnaud Delobelle
vsoler writes: > I have a class that is a wrapper: > > class wrapper: > def __init__(self, object): > self.wrapped = object > def __getattr__(self, attrname): > print 'Trace: ', attrname > #print arguments to attrname, how? > return getattr(self.wrapped, at

Re: Printing the arguments of an attribute in a class

2010-02-28 Thread vsoler
On Feb 28, 4:00 pm, "Alf P. Steinbach" wrote: > * vsoler: > > > > > I have a class that is a wrapper: > > > class wrapper: > >     def __init__(self, object): > >         self.wrapped = object > >     def __getattr__(self, attrname): > >         print 'Trace: ', attrname > >         #print argumen

Re: Printing the arguments of an attribute in a class

2010-02-28 Thread Alf P. Steinbach
* vsoler: I have a class that is a wrapper: class wrapper: def __init__(self, object): self.wrapped = object def __getattr__(self, attrname): print 'Trace: ', attrname #print arguments to attrname, how? return getattr(self.wrapped, attrname) I can run it

Printing the arguments of an attribute in a class

2010-02-28 Thread vsoler
I have a class that is a wrapper: class wrapper: def __init__(self, object): self.wrapped = object def __getattr__(self, attrname): print 'Trace: ', attrname #print arguments to attrname, how? return getattr(self.wrapped, attrname) I can run it this way: >