allow line break at operators

Steven D'Aprano steve+comp.lang.python at
Fri Aug 12 03:40:00 CEST 2011

Chris Angelico wrote:

> Incidentally, I will happily argue the
> benefits of Python's significant whitespace, even though I disagree
> with it; there are quite a few. 

Please be careful about conflating significant indentation with significant
whitespace. Many languages have significant whitespace:

foo bar

is rarely the same thing as


but is the same as

foo           bar

Python is no different.

The only exception I can think of is *very* early Fortran, and that rightly
is considered a mistake. Fortran 77 used to treat whitespace as always
optional, so that in Python terms this:


would be parsed as this:

for x in range(42)

See also:

> (Is the fact that it discourages 
> massive one-liners considered to be a benefit?)

Hell yes!


More information about the Python-list mailing list