An interesting beginner question: why we need colon at all in the python language?
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.
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...
More information about the Python-list