-
Book Overview & Buying
-
Table Of Contents
Hands-On Software Engineering with Python - Second Edition
By :
Code standards are nothing more than a set of expectations about how code is written, documented, tested, and delivered. When those expectations are adhered to, they lend consistency to the codebase, making it easier for engineers to collaborate, whether working with the existing code, adding new functionality to it, or dealing with a bug within it.
The first of these standards we will examine centers around how code is formatted or styled, and the conventions available and expected in a Python context. For the most part, those are ensconced in a Python Enhancement Proposal (PEP) that dates back to 2001: PEP 8, the Style Guide for Python Code.
Python’s official style guide can be found in the PEP 8 documentation, https://peps.python.org/pep-0008/. It currently reflects the original Style Guide essay by Guido van Rossum, with additions from a style guide by Barry Warsaw. One of the first and most important things that it notes...