[EMAIL PROTECTED] wrote: > How do I catch any reference to an instance of a class, i.e., I want to > run some code as soon as an instance of a class is used in any way. > (and I don't want to define all of __add__, __ge__ etc etc etc etc etc)
What do you mean by "used in any way"? Which of these are considered usage: >>> a = Foo() # obviously >>> b = a # ? >>> a.__gt__(5) # apparently >>> a.__gt__ # ? Anyway, look into __getattr__ Cheers, Brian -- http://mail.python.org/mailman/listinfo/python-list