Hi Tutor,

I am searching for any magic method/or any method that calls on every
calling of the Class methods.

for example:

Class A(object):
    def one(self):
        return

    def two(self):
        return

I need a method that prints which method is called in this class.
I am aware of __call__() but this is called only once when the Class is
called
and decorators. This is need to placed on every method.

c = A()
c()  # __call__ method is called.

Is there any magic method that is auto called on every call of these Class
Methods?



Thanks,
Sunil. G
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to