0

Is there some way to do something like this?

def func():
    print(get_current_function())

and that would print out func.

How could I implement this function?

Is it already implemented anywhere? (i.e. standard library)

Thanks!

  • 1
    Please give _context_ when you're asking questions, as it helps avoid the [XY problem](https://meta.stackexchange.com/q/66377/248731). Last time I saw someone asking for this it turned out there was an entirely different (and much simpler) solution: https://stackoverflow.com/q/68065684/3001761. – jonrsharpe Aug 02 '21 at 19:13

0 Answers0