Introspection to get decorator names on a method?

后端 未结 8 1594
滥情空心
滥情空心 2020-12-01 08:00

I am trying to figure out how to get the names of all decorators on a method. I can already get the method name and docstring, but cannot figure out how to get a list of dec

8条回答
  •  生来不讨喜
    2020-12-01 08:17

    You can't but even worse is there exists libraries to help hide the fact that you have decorated a function to begin with. See Functools or the decorator library (@decorator if I could find it) for more information.

提交回复
热议问题