name of the current function ?

Solveig Wiesmayr Solveig.Wiesmayr at t-online.de
Sat Apr 27 09:04:48 EDT 2002


A beginners question :

I would like to get the name 'my_name' of the current function to pass it
to some other (debugging-) function.

def aaa():
    my_name = 'aaa'
    current_f(my_name)

def current_f(name):
    print name

aaa()

Thanks for hints.






More information about the Python-list mailing list