trapping all method calls in a class...

Piyush Anonymous piyush.subscription at gmail.com
Sun Dec 21 08:12:19 CET 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.html>


More information about the Python-list mailing list