Skip to content

Tag: conventions

Proper use of comments

For Python code, PEP 257 provides a convention for using docstrings to document structural entities: packages, modules, functions, classes, and methods. This covers pretty much everything. Stack Overflow questions about how to comment Python code invariably elicit answers saying to use docstrings. Where does …