python 获取当前方法名

1 import inspect
2 
3 def get_current_function_name():
4     return inspect.stack()[1][3]
posted @ 2012-11-16 19:07  践道者  阅读(1044)  评论(0编辑  收藏  举报