Toggle navigation
JUPYTER
FAQ
View as Code
Python 3 Kernel
View on GitHub
Execute on Binder
Download Notebook
effective_python_notebook
item_02-Follow the PEP 8 Style Guide.ipynb
Notebook
Following the PEP-8 Standard
¶
Indents: Four spaces for each indentation def foo(): print "Hello, World!"
Maximum line length: 80 characters.
Blank lines: Two between import, class, and function de nitions. One between method defnitions inside a class.
Import statements: Should be one per line.
import os import sys
Class names: Should have capitals for the rst letter of each word. class MyClass(object):
Method names: Should use all lowercase and underscores to separate words. def my_method_example():