I would like to break a long statement like:
with X1() as y1, X2() as y2, X3() as y3: # Really long line
# Do something
I have tried:
with (
X1() as y1,
X2() as y2,
X3() as y3):
# Do something
but this is a syntax error. It seems that the following works, but I find it relatively difficult to read:
with X1(
) as y1, X2(
) as y2, X3(
) as y3:
# Do something
Are there any suggestions on how to best format a long with
statement like this? Thanks.