- Four space indentation (no tabs).
- Use single quotes for strings.
- Keep lines shorter than 80 characters when possible.
Follow the PEP8 Style Guide.
Most important things:
- Separate top-level function and class definitions with two blank lines.
- Method definitions inside a class are separated by a single blank line.
- Use whitespace between comma seperated values.
- Use white space between assignments and expressions (except parameter values).
- Don't use whitespace before or after parentheses, brackets or braces.
- Classes should use CamelCase naming.
- Functions should use lowercase naming.