Why aren't colons optional?

Alex Martelli aleax at aleax.it
Sun Jan 20 03:40:46 EST 2002


Edward K. Ream wrote:
        ...
> readability than do trailing semicolons.  The only syntax error I
> regularly make is to forget a trailing colon. After all, newlines

FWIW: me too, despite being a rather good Pythonista by now.  At
least, because it keeps happening often, I can recognize and fix it
instantly.  Apparently (if the ABC studies are to be believed) making
the colons optional would make the code less readable to most
people (not to ME, for sure), so you and I may just be wired differently
from most.

In my case, tests give me a very high verbal-orientation, very low
visual-orientation -- the ratio between the two puts me between
the outliers; in school I had top mark most everywhere _except_
geometry and drafting; so this is not the only indication I have that
"I'm wired differently" in this regard.

And the funniest thing is that in most places Python does *away*
with punctuation (part of why I love it so)... but not here.  Oh well.
I've looked into Ruby (no trailing colon in def statements) but it
has other cruft (e.g. 'end' keyword).  Oh well, squared.


Alex




More information about the Python-list mailing list