Python conventions
Variable names
Variables names are in lower case with underscores used to separate words, as needed.
Constant names
Constant names are in upper case with underscores used to separate words, as needed.
Indentation in function definitions
Indent four spaces in the body of a function definition.
Docstrings for functions
A docstring in Python is put right after the function header. Multiple lines are fine. Use three double quotes to start and end.
Separation of class headers and docstrings
Put a blank line between a class header and the docstring for the class.
Docstrings for classes
In the docstring for the class, give the summary, list methods, and list attributes.
Separation of docstrings and methods
Put blank lines between the docstring for the class and the methods.