ampoule 项目在 docstring 中使用了一些标签,例如 javadoc 标签。
例如来自pool.py第 86 行:
def start(self, ampChild=None):
"""
Starts the ProcessPool with a given child protocol.
@param ampChild: a L{ampoule.child.AMPChild} subclass.
@type ampChild: L{ampoule.child.AMPChild} subclass
"""
这些标签是什么,哪个工具使用它。
最佳答案
只是为了好玩,我会注意到 Python 标准库正在使用 Sphinx/reStructuredText,其 info field lists相似。
def start(self, ampChild=None):
"""Starts the ProcessPool with a given child protocol.
:param ampChild: a :class:`ampoule.child.AMPChild` subclass.
:type ampChild: :class:`ampoule.child.AMPChild` subclass
"""
关于python - python 文档字符串中的@ivar @param 和@type 这些标签是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/379346/