Hi,

Is there a way to hook a function call in python? I know __getattr__
is doing for variables, it is giving us a chance before a field is
initialized. Do we have same functionality for methods?

Example:

class Foo(object):
    def __call_method__(self, ...) # just pseudo
        print 'A method is called in object...'

f = Foo()
f.test_method()

I think you understand my point.

Thanks,
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to