How to write a docstring¶
All functionality needs have a documentation string (docstrings). The convention used in Nashpy is to follow Numpy’s docstring convention:
def <function>(<signature>):
"""
<short summary>
Parameters
----------
<paramter> : <type>
<description>
<paramter> : <type>
<description>
...
<paramter> : <type>
<description>
Returns
-------
<type>
<description>
"""
If the function/method does not return anything but is instead a generator
then Returns
should be replaced with Yields
.