Obtenha o nome da função atual no python3

import inspect
def myfirstfunc():
    print(inspect.currentframe().f_code.co_name)
    # OR
    print(inspect.stack()[0][3])
myfirstfunc()
Majid Peidaei