Py3K idea: why not drop the colon?
mike at hobbshouse.org
Fri Nov 10 22:18:55 CET 2006
Ron Adam wrote:
> It is also an outline form that frequently used in written languages. Something
> python tries to do, is to be readable as if it were written in plain language
> where it is practical to do so. So the colon/outline form makes a certain sense
> in that case as well.
That is perhaps the most convincing argument that I've heard so far.
Indeed, I often find myself writing out colons when writing pseudo-code
out on paper. The reason, however, is usually because my indents don't
quite line up as perfectly on paper as they do in an editor. The colons
provide a form of backup separation for when my columns start to get
sloppy. (Natural language is actually filled with such redundancies in
order to compensate for sloppy handwriting.) This backup function
obviously isn't needed when a computer is taking care of the layout.
My final argument against the colons is to simply try programming in
Ruby for a while and then come back to Python. I think you'll find that
programming without the colons just simply feels more "natural".
More information about the Python-list