3

I'm trying to understand the "solution ecosystem" with respect to creating docstrings, and then generating some nice reference documentation with PyCharm/IntelliJ.

I'm used to the Google style docstrings, and am confused by PyCharm's default docstring skeleton format/style however:

"""
:param <paramname>: blah blah
:return None
"""

What style is this and what reference doc generators does it work with? Is there a style guide somewhere?

conner.xyz
  • 6,273
  • 8
  • 39
  • 65
  • That is the [reStructuredText](https://stackoverflow.com/questions/45081675/ive-been-using-this-docstring-syntax-for-2-years-now-whats-it-called-who-spe) docstring style. That style is specified by [PEP 287](https://www.python.org/dev/peps/pep-0287/) – Cory Kramer Sep 21 '17 at 14:52

1 Answers1

4

Those are the Sphinx style doc strings.

Python has some strong opinions about doc strings, see PEP257.

Here is a full description of all of the doc string types in Python: What is the standard Python docstring format?

townie
  • 302
  • 3
  • 9