Trying to get a function name in Python, I would like to achieve something like this:
def my_function():
do_something...
def get_func_name(function):
return magic(function)
>>> print get_func_name(my_function)
>>> my_function
How should this be done?
Thanks a lot!