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

Thorsten Kampe thorsten at thorstenkampe.de
Wed Jul 13 13:27:02 EDT 2011


* Grant Edwards (Wed, 13 Jul 2011 13:03:22 +0000 (UTC))
> On 2011-07-13, Thorsten Kampe <thorsten at thorstenkampe.de> wrote:
> 
> >> and that that block is to be considered in relation to what was just
> >> said, before the colon.
> >
> > The indentation makes it abundantly clear to the human reader that
> > that indented block is to be considered in relation to what was just
> > said, before the indentation.

> You would think so, but human readers like redundancy.

I also like redundancy (and consistency). That's why I'd much more 
prefer a "then" than a colon which is easily overlooked while reading 
/and/ while writing.

Thorsten



More information about the Python-list mailing list