Pythonic coding conventions

Last updated:

PYTHON

In PEP 8, from The quick python book.

  1. Module/package names - short lower case, underscores only if needed
  2. Function names - all lowercase, underscores for readability
  3. Variable names - all lowercase, underscores for readability
  4. Class names - capitalise each word
  5. Constant names - all caps with underscores
  6. Indentation - 4 spaces, no tabs
  7. Comparisons - don’t compare explicitly to true or false