Possible Duplicate:
How to get the function name as string in Python?
I know that I can do that :
def func_name():
print func_name.__name__
which will return the name of the function as 'my_func'.
But as I am into the function, is there a way to directly call it generically ? Something like :
def func_name():
print self.__name__
In which Python would understand that I want the upper part of my code hierarchy?