O
Olaf Meding
I am looking for a way to get at the name of the function (while
executing code inside the function) without (!) knowing the name of
the function.
The code below works, but requires the name of the function. I am
looking for a way to do the same w/o specifying the name of the
function.
def olaf():
# requires name of the function
print olaf.__name__
# this does not work
print self.__name__
executing code inside the function) without (!) knowing the name of
the function.
The code below works, but requires the name of the function. I am
looking for a way to do the same w/o specifying the name of the
function.
def olaf():
# requires name of the function
print olaf.__name__
# this does not work
print self.__name__