How to document multiple return values using reStructuredText in Python 2?
<p>The <a href="https://docs.python.org/devguide/documenting.html" rel="nofollow">Python docs</a> say that "the markup used for the Python documentation is <a href="http://docutils.sf.net/rst.html" rel="nofollow">reStructuredText</a>". My question is: How is a block comment supposed to be written to show multiple return values?</p>

<pre><code>def func_returning_one_value():
    """Return just one value.

    :returns: some value
    :rtype: str
    """

def func_returning_three_values():
    """Return three values.

    How do I note in reStructuredText that three values are returned?
    """
</code></pre>

<p>I've found a <a href="http://thomas-cokelaer.info/tutorials/sphinx/docstring_python.html" rel="nofollow">tutorial</a> on Python documentation using reStructuredText, but it doesn't have an example for documenting multiple return values. The <a href="http://www.sphinx-doc.org/en/stable/domains.html" rel="nofollow">Sphinx docs on domains</a> talks about <code>returns</code> and <code>rtype</code> but doesn't talk about multiple return values.</p>

<p>As wwi mentioned in the comments, the detailed format to be used is not strictly defined.  </p>

<p>For myself, I usually use the <a href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#field-lists" rel="nofollow">Field List</a> notation style you use above. It supports line breaks, so just break where you feel is necessary</p>

<pre><code>def my_func(param1, param2):
    """
    This is a sample function docstring

    :param param1: this is a first param
    :param param2: this is a second param
    :returns: tuple (result1, result2) 
        WHERE
        str result1 is .... 
        str result2 is ....        
    """
</code></pre>

python python-2.7 documentation restructuredtext