Skip to content

Instantly share code, notes, and snippets.

@christinebuckler
Last active June 5, 2019 16:33
Show Gist options
  • Save christinebuckler/d828bfb86d91913592877d943de5cf0d to your computer and use it in GitHub Desktop.
Save christinebuckler/d828bfb86d91913592877d943de5cf0d to your computer and use it in GitHub Desktop.
python function with docstring template
def func(arg1, arg2):
"""Summary line.
Extended description of function.
Parameters
----------
arg1 : int
Description of arg1
arg2 : str
Description of arg2
Returns
-------
bool
Description of return value
See Also
--------
otherfunc : some related other function
Examples
--------
These are written in doctest format, and should illustrate how to
use the function.
>>> a=[1,2,3]
>>> print [x + 3 for x in a]
[4, 5, 6]
"""
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment