LINE CONTINUATION IN PYTHON
PEP8's E128: continuation line under-indented for visual indent?
Two ways to continue lines with opening parenthesise.g
urlpatterns = patterns(' ', url(r'^$', listing, name='investment-listing')
print('\n'.join([" ".join(["{:d}".format(item) for item in row]) for row in matrix])) too long right?
- indenting to the opening bracket
- print('\n'.join([" ".join(["{:d}".format(item)
_____________________for item in row]) for row in matrix]))
- no arguments on starting line, then indenting to a uniform level(if no other opening parethesis is present before breaking))
- urlpatterns = patterns(
_____' ',
_____url(r'^$', listing, name='investment-listing')
OR(if other parenthesis are opened before breaking follow rule 1 with rule 2)
print(
___'\n'.join([" ".join(["{:d}".format(item)[normal indentation of 4 spaces here]
___________for item in row]) for row in matrix]))[indent to parenthesis)
Note: backslash \ can also be used for line breaks or continuation
__ represent spaces