Py3K idea: why not drop the colon?
Daniel Dittmar
daniel.dittmar at sap.com
Thu Nov 9 12:36:13 EST 2006
Michael Hobbs wrote:
> But if the BDFL insists that it remains, why not
> take the converse approach? That is, assume that the expression ends at
> the colon, not at the newline. That would make this type of statement
> possible:
I suggested something like this a while back. The answer then was that
error messages in case of a forgotten colon would be misleading, at the
wrong position, or both.
Today:
if a or b
print x
File "colontest.py", line 2
if a or b
^
SyntaxError: invalid syntax
Daniel
More information about the Python-list
mailing list