Extra Credit Download for Mac

PEP 8 Style Guide for Python Code

Official docs outline

6 sections
  1. Code lay-out

    Indentation, line length and blank lines.

  2. Imports

    Import grouping and ordering.

  3. Whitespace in expressions and statements

    Where to use spaces around operators and brackets.

  4. Comments and docstrings

    Comment style and docstring conventions.

  5. Naming conventions

    snake_case, CapWords and constants naming.

  6. Programming recommendations

    Idioms such as is None, exceptions and return consistency.

Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.

All 33