PEP 8 -- Style Guide for Python Code

GPTKB entity

Statements (30)
Predicate Object
gptkbp:instanceOf style
Python Enhancement Proposal
gptkbp:appliesTo gptkb:Python_programming_language
gptkbp:author gptkb:Guido_van_Rossum
gptkb:Barry_Warsaw
gptkb:Nick_Coghlan
gptkbp:category gptkb:Python_Enhancement_Proposals
Programming style guides
gptkbp:created 2001-07-05
https://www.w3.org/2000/01/rdf-schema#label PEP 8 -- Style Guide for Python Code
gptkbp:influenced Python community coding standards
Python code linters (e.g., flake8, pylint, black)
gptkbp:JEP_number 8
gptkbp:language English
gptkbp:purpose Provide coding conventions for Python code
gptkbp:recommendation 4 spaces per indentation level
docstring conventions
avoid extraneous whitespace
limit lines to 79 characters
naming conventions for variables, functions, classes
blank lines between functions and classes
consistent use of quotes
import order guidelines
use of spaces around operators
gptkbp:status Active
gptkbp:title gptkb:PEP_8_--_Style_Guide_for_Python_Code
gptkbp:topic Python code style
gptkbp:url https://peps.python.org/pep-0008/
gptkbp:bfsParent gptkb:PEP8
gptkbp:bfsLayer 8