Python Docstrings
There are two common styles for writing python docstrings:
Sphinx
def hello(name, language="en"): """Say hello to a person. :param name: the name of the person :type name: str :param language: the language in which the person should be greeted :type language: str
:return: a number :rtype: int """ print(greeting[language]+" "+name) return 4
Google Python Style Guide**
def hello(name, language="en"): """Say hello to a person. Args: name: the name of the person as string language: the language code string Returns: A number. """ print(greeting[language]+" "+name) return 4
ref: GoalKicker.com – Python® Notes for Professionals 40