【发布时间】:2010-10-03 13:41:56
【问题描述】:
我知道@staticmethod、@classmethod 和@property,但只是通过分散的文档。 Python 中内置的所有函数装饰器是什么?是在文档中吗?是否在某处维护了最新列表?
【问题讨论】:
-
没有官方名单,但是这个链接很有用:github.com/lord63/awesome-python-decorator
-
最著名的是:
@staticmethod、@classmethod、@property、@wraps、@timeit