Python statements not forcing whitespace is messy?

buffi bjorn.kempen at gmail.com
Sat Sep 15 21:21:50 CEST 2007


Am I the only one that thinks that python statements should force
whitespace before and after them?

Right now this is not enforced and for an example these statements are
valid

print"hello"
"foo"if"bar"else"foobar"
for(x,y)in[(1,2),(3,4)]:print(x,y)
[(y)for(x,y)in[("foo",2),("bar",4)]if"foo"in(x)]

...and so on.

I know that writing code like this really shouldn't be done but
wouldn't it be a good idea to enforce the use of whitespace around
statements?

(I wrote a short blog post about this here http://blog.buffis.com/?p=55
but thought I would post here as well to see what other developers
think)
- Björn Kempén




More information about the Python-list mailing list