trapping all method calls in a class...

Piyush Anonymous piyush.subscription at gmail.com
Sun Dec 21 02:12:19 EST 2008


hi,
i need to trap all method calls in a class in order to update a counter
which is increased whenever a method is called and decreased whenever method
returns. in order to that i am trying to write a decorator for all the
methods.

see the code here with error.
-------
http://codepad.org/2w7JVvDB
----
any suggestions? any other better way of doing it?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20081221/8aa2ba64/attachment-0001.html>


More information about the Python-list mailing list