簡體   English   中英

這些標簽@ivar @param和python docstring中的@type是什么?

[英]What are these tags @ivar @param and @type in python docstring?

安瓿項目在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
    """

什么是這些標簽,哪個工具使用它。

文檔工具的標記,可能是epydoc

為了好玩,我會注意到Python標准庫使用的是Sphinx / reStructuredText,其信息字段列表類似。

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
    """

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM