Style Guide for Python

Authors: Guido van Rossum, Barry Warsaw


This document gives coding conventions for the Python code comprising the standard library in the main Python distribution. Please see the companion informational PEP describing style guidelines for the C code in the C implementation of Python.1

This document was adapted from Guido’s original Python Style Guide essay,2 with some additions from Barry’s style guide.3 Where there’s conflict, Guido’s style rules for the purposes of this PEP. This PEP may still be incomplete (in fact, it may never be finished <wink>). All that being said though, a quick visit to ...

Get Pro Python, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.