I have a class:
class A(object): calledMethod = None def a1(self): pass def a2(self): pass
Now when I create an object and call some method:
a = A() a.a1() #or a.a2()
I need somehow to save the name of called method in variable calledMethod. Could this be done with descriptors? That will be the best way since I dont want to put extra code in every method to find its name...