Skip to content

Instantly share code, notes, and snippets.

@elyezer
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elyezer/8939552 to your computer and use it in GitHub Desktop.
Save elyezer/8939552 to your computer and use it in GitHub Desktop.
PEP8 code style examples
# 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