intercepting method call

Tripp Scott tripps81 at yahoo.com
Sun Dec 2 14:45:14 EST 2001


class A:

    def __validate__(self, methodName, args):
        # do some checking

    def x(self, foo, bar):
        # do something

what i would like is to have some validating routine
(either the said object's __validate__() or some
method from another object) be automatically invoked
whenever the target method x is called. can i do that
in Python?

t


__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com




More information about the Python-list mailing list