python - python 文档字符串中的@ivar @param 和@type 这些标签是什么?

标签 python documentation javadoc

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/

相关文章:

python - 如何在 Python 设置脚本中引入 importlib.resources

f# - F# 语言引用文档是否以离线格式(PDF、CHM)提供?

java - javadoc 中的 -nodeprecated 选项似乎不起作用。我能做什么?

java - 在文档中显示方法体的一部分

python - 是否可以将坐标拟合到 OSMnx 中的街道?

python - 在 SQLAlchemy 中处理 Redshift 标识列

Python Set Comprehension嵌套在Dict Comprehension中

javascript - 是否有一个 javascript 网站/wiki/引用 Angular ,我们可以在其中查看哪些浏览器支持 *selected-function*?

r - 氧气的好引用?

java - ManagedExecutorService 从 1.0 开始?