In Python, without using the traceback module, is there a way to determine a function's name from within that function?
Say I have a module foo with a function bar. When executing foo.bar(), is there a way for the bar to know the bar's name? Or better yet, foo.bar's name?
print "my name is", __myname__ # <== how do I calculate this at runtime?