Python-Sphinx返回列表或元组

时间:2014-02-25 00:21:45

标签: python documentation return python-sphinx

我正在使用sphinx进行记录,并且我有返回列表/元组等的函数。

因此,对于参数,以下指向python文档的链接:

:param list myVar:

但是对于以下工作的返回值:

:rtype: list
:rtype: :class:`list`

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

在Python文档中,名为list的函数在引用列表时链接到。所以,试试:

:rtype: :func:`list`