如何在 python 函式內部得知函式名稱

http://stackoverflow.com/questions/245304/how-do-i-get-the-name-of-a-function-or-method-from-within-a-python-function-or-m


簡單來說是在函式內執行: inspect.stack()[0][3]

留言

熱門文章