标签: python function
是否可以从函数中查找函数名称?
def some_function(): function_name = ... # some way of retrieving the name 'some_function' print(function_name)
function_name的期望值为字符串:“ some_function”
function_name
答案 0 :(得分:0)
some_function .__ name__应该起作用