1、如果是直接写死在函数内可使用: sys._getframe().f_code.co_name 示例: def func1(self): print(sys._getframe().f_code.co_name) 2、单独写成函数...