Last active
August 29, 2015 13:56
-
-
Save elyezer/8939552 to your computer and use it in GitHub Desktop.
PEP8 code style examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Breaking lines inside (), [], {} | |
# ================================ | |
# Breaking imediatelly after the opening (, [ or { | |
# needs only one level of identation | |
some_big_function_name( | |
'one', 'two', 'three') | |
# Breaking after a , then need to align with the opening (, [ or { | |
some_big_function_name('one', 'two', 'three' | |
'four', 'five') | |
# Breaking in larger strings | |
my_large_string = ("my really really really really really really really " | |
"really really really really really large string") | |
my_other_large_string = ( | |
"my really really really really really really really " | |
"really really really really really large string") | |
# Imports | |
from some_module import (a, bunch, of, names, | |
to, be, imported) | |
from some_module import ( | |
a, bunch, of, names, to, be, imported) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment