PEP 8
PEP 8 — PEP 8 is Python's official style guide, providing conventions for writing readable and consistent Python code. PEP 8 covers indentation (4 spaces per level), line length (79 characters max), naming conventions (snake_case for functions/variables, PascalCase for classes), and import organization. Tools like `flake8`, `pylint`, and `black` automatically enforce PEP 8. Following these conventions makes Python code consistent across projects. This term relates to the Statements & Keywords category of the reference. Related terms: Decorator, Generator, Context Manager, GIL (Global Interpreter Lock), Duck Typing, List Comprehension. Understanding pep 8 makes the rest of the Python documentation noticeably easier to follow, because the concept recurs across function references, guides, snippets, and error messages you will meet in real projects. Look up more definitions in the Python glossary, or put the concept into practice with an example from the Python playground.