Zachary Ware added the comment:

The problem is, the interpreter can't know what you meant to do, so it can only 
point out what it can't compile.  We did recently add a special case for print 
without parentheses, but adding special cases for everything is just not 
feasible.  Besides, where should the caret point in each of these cases, why, 
and how would you explain it to the parser?

for x in the range(10):

for x in range(10) the:

for x in range(10) range(10):

for each x in range(10):

for x each in range(10):

Those are just some of the possibilities for just the for statement, let alone 
every other statement, or even every place an expression can be used.

If you can come up with a good, simple, general patch that covers every case, 
please do so!  I'm quite sure it would be accepted.  But until then, I'm afraid 
this isn't going to happen.

status: open -> closed

Python tracker <>
Python-bugs-list mailing list

Reply via email to