get current function name

Joe Wong (Mango) joewong at mango.cc
Fri Dec 2 05:31:10 CET 2005


Hello,

 Is this possible for a function to obtain its own name ?

eg.

def func1():
    print "my name is " + get_my_name()

the result will show "my name is func1"

Regards,

- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051202/d8767bfc/attachment.html>


More information about the Python-list mailing list