I can't find an answer within the PEP 8 style guide.
Is there a possibility to break up a long for
statement by using round brackets instead of a backslash?
The following will result in a syntax error:
for (one, two, three, four, five in
one_to_five):
pass
If the long part is the unpacking, I would just avoid it:
Or if it is really long:
If the
iterable
is a long expression you should put it in a line by itself before the loop:If both are long then you can just combine these conventions.