On Sat, 27 Apr 2002, Solveig Wiesmayr wrote: SW> I would like to get the name 'my_name' of the current SW> function to pass it SW> to some other (debugging-) function. >>> import sys >>> def my_name(): ... return sys._getframe(1).f_code.co_name ... >>> my_name() '?' >>> def f(): ... return my_name() ... >>> f() 'f'