Skip to content

Instantly share code, notes, and snippets.

View doolio's full-sized avatar

Niall Dooley doolio

  • 01:21 (UTC +02:00)
View GitHub Profile
@doolio
doolio / good_docstrings.py
Last active November 10, 2023 14:11 — forked from dolph/good_docstrings.py
pep257-good-python-docstrings-by-example
#!/usr/bin/env python3
"""Demonstrate high quality docstrings.
Module-level docstrings appear as the first "statement" in a
module. Remember, that while strings are regular Python statements,
comments are not, so an inline comment may precede the module-level
docstring.
After importing a module, you can access this special string object