Docstrings
Description
Python docstrings can be written in many different formats. An overview of different methods can be found in the following Stack Overflow entry: What is the standard Python docstring format?
It seems to be clever to use the docstring format of scipy and numpy since these packages are very popular. A guide to the numpy docstring format is here: numpydoc docstring guide and here is a Restructured Text (reST) syntax CheatSheet for Sphinx.
Links
- PEP 8: https://www.python.org/dev/peps/pep-0008/
- PEP 257: https://www.python.org/dev/peps/pep-0257/
- PEP 287 - reStructuredText Docstring Format: https://www.python.org/dev/peps/pep-0287/
- Google Python Style Guide: https://github.com/google/styleguide/blob/gh-pages/pyguide.md
- Example Google Style Python Docstrings: https://www.sphinx-doc.org/en/master/usage/extensions/example_google.html
Last modified May 29, 2023: Update docstrings.md (2c11be9)