Get the current function’s name

Chester Wyke June 02, 2022 Updated: April 15, 2025 #python

Source: https://stackoverflow.com/questions/5067604/determine-function-name-from-within-that-function-without-using-traceback

inspect.currentframe().f_code.co_name