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

Grant Edwards invalid at invalid.invalid
Thu Jul 14 16:34:39 CEST 2011


On 2011-07-13, Thorsten Kampe <thorsten at thorstenkampe.de> wrote:
> * 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.

How is the "then" going to be consistent with other things that also
introduce blocks (def, try, with, etc.).

-- 
Grant Edwards               grant.b.edwards        Yow! !  I'm in a very
                                  at               clever and adorable INSANE
                              gmail.com            ASYLUM!!



More information about the Python-list mailing list