Skip to content

Glossary: Refactoring and Clean Code

Docstring

Also written: docstrings, PEP 257

A string written as the first statement of a module, function or class. Python keeps it, so `help()` and editors can show it. PEP 257, Python's docstring guide, asks for triple double quotes and a one-line imperative summary.

Where the book teaches it

Related terms

help()README