<分区>
Possible Duplicate:
How do I get the name of a function or method from within a Python function or method?
How to get the function name as string in Python?
我有一个名为func 的函数,我希望能够将函数名称作为字符串获取。
伪 python :
def func () :
pass
print name(func)
这将打印“func”。