Skip to content
Edoardo Pasca edited this page Apr 25, 2019 · 4 revisions

Welcome to the CCPi-Framework wiki!

Docstring conventions

Python Docstrings are written in restructured text. Normally main elements we would use are in the example below

def function(arg1, arg2):
    '''Use the first line to describe what the function/class does

    Leave an empty line and give more details if possible. Add cool LaTeX math as
    .. math::
      
      f(x) = c*||A*x-b||_2^2
    
    You can use lists as
      + this
      + is a
      + unordered list

    If the function has parameters add the reason of the parameter and values as:

    :params: :code:`arg1`: say something about the parameter
    :params: :code:`arg2`: as above
    '''
    pass
Clone this wiki locally