3 ms·
Yeah, that was likely a big mistake on their part. Arguments on significant whitespace aside, I think that this is one thing that Python got right. (For refere
by koenigdavidmj 16y ago
Yeah, that was likely a big mistake on their part.
Arguments on significant whitespace aside, I think that this is one thing that Python got right. (For reference, Python's rules are that ending a line with a backslash will continue a statement, and the same effect will occur automatically if you have a parenthesis, curly, or bracket open.)
I might also be convinced that it would be a good idea to have statement continuation happen if the last token on a line was a binary operator, for the benefit of code like:
if self.foo() and
self.bar() and
self.baz():
do stuff
(Currently PEP 8 requests that you put parentheses around the test.)