<p>所以,structuredText是
<a href="https://www.python.org/dev/peps/pep-0287" rel="nofollow noreferrer">the recommended way</a>对于Python代码
文档,如果你足够努力,你可以
<a href="http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#python-signatures" rel="nofollow noreferrer">find in the sphinx documentation</a>
如何规范化函数签名文档。所有的例子都是
单行,但是如果参数描述是多行的,如下面所示
? </p>
<pre><code>def f(a, b):
""" Does something with a and b
:param a: something simple
:param b: well, it's not something simple, so it may require more than eighty
chars
"""
</code></pre>
<p>它的语法/惯例是什么?我应该缩进还是不缩进?是否会中断reSTructuredText呈现?</p>
<p>只需换行就可以了。</p>
<pre><code>def f(a, b):
""" Does something with a and b
:param a: something simple
:param b: well, it's not something simple,
so it may require more than eighty
chars
"""
</code></pre>