【发布时间】:2013-07-24 08:39:15
【问题描述】:
以下两个属性定义在 Sphinx autodoc HTML 输出中显示完全相同:
@property
def concrete(self):
"""This is the concrete docstring"""
pass
@abstractproperty
def abstract(self):
"""This is the abstract docstring"""
pass
Sphinx 有没有办法用某种标识符来注释抽象方法?我希望在我的文档中清楚地表明我的 ABC 的哪些成员需要实现,以及在定义了所需的那些成员后,你会获得哪些 mixin 免费赠品。
【问题讨论】:
标签: python python-sphinx python-decorators autodoc abc