V
Vivek Sawant
Hi,
Is there a way to obtain the method/function object from within the
method like 'self' refers to the object instance. I would like to avoid
looking method name (string) in class/object attributes. My goal is to
write code that need not be changed when the method name is changed.
def method (self, ...)
# somehow obtain 'methodobj' for this 'method'
mname = methodobj.__name__;
# do something with mname
Thanks.
\vivek
Is there a way to obtain the method/function object from within the
method like 'self' refers to the object instance. I would like to avoid
looking method name (string) in class/object attributes. My goal is to
write code that need not be changed when the method name is changed.
def method (self, ...)
# somehow obtain 'methodobj' for this 'method'
mname = methodobj.__name__;
# do something with mname
Thanks.
\vivek