"questions?" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am a little confused by an example in python book:
>
> class wrapper:
>def __init__(self,object):
>self.wrapped=object
>def __getattr__(self,attrname):
>print "Trace:",attrname (<<
I am a little confused by an example in python book:
class wrapper:
def __init__(self,object):
self.wrapped=object
def __getattr__(self,attrname):
print "Trace:",attrname
print getattr(self.wrapped,attrname) (*)
return getattr(self.wrapped,attrname)