Are line continuations needed?
Jeff Epler
jepler at unpythonic.net
Wed Apr 7 20:19:20 EDT 2004
I would not miss \-continuations much.
I think you're mistaken about continuations "automatically with an
incomplete infix operator":
>>> 1 +
File "<stdin>", line 1
1 +
^
Did I misunderstand what you meant?
I would sorely miss lines continued due to the presence of nesting
expressions, like
d = {
'x': 1,
'y': 2
}
and
if (x == 3
and y == x * 4):
return True
These kinds of continued lines are IMO easier to get right than
\-continuations, because those rely on absence of whitespace in a place
where the presence rarely makes a visible difference (backslash space
newline is not a continuation).
Jeff
More information about the Python-list
mailing list