An interesting beginner question: why we need colon at all in the python language?

Dan Stromberg drsalists at gmail.com
Tue Jul 12 01:35:53 CEST 2011


On Mon, Jul 11, 2011 at 8:28 AM, Ian Kelly <ian.g.kelly at gmail.com> wrote:

> On Mon, Jul 11, 2011 at 8:50 AM, Sébastien Volle
> <sebastien.volle at gmail.com> wrote:
> > Could it have been made optional, like the trailing comma in list
> > declaration?
>
> Cobra makes the colons optional, so probably yes.
> --
> http://mail.python.org/mailman/listinfo/python-list
>

A little redundancy in a computer language facilitates error checking - much
like the bits of redundancy in one's English make written and voice
communication less error prone.

But strictly speaking, the colon could've been left out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110711/166d991d/attachment.html>


More information about the Python-list mailing list