PEP 257 recommends docstrings for all modules and for functions and classes exported by a module. It also specifies triple double quotes as the consistent delimiter for docstrings; where backslashes are needed, it recommends a raw triple-double-quoted string. Public methods—not non-public methods—are the methods identified as needing docstrings, and the blank-line rule applies after class docstrings.
Community Discussion