syntax
Gordon McMillan
gmcm at hypernet.com
Fri Jul 30 11:56:57 EDT 1999
Xavier Bec writes:
>
> Why are the double dots ":" necessary after a if, for or while
> instruction ?
> All the others instructions are terminated with a cariage return but
> not condition or loop ones. I know that a semi-column is facultative
> and only used if you have to put a second instruction on the same
> line. Why is not the same for if, etc.
>From the standpoint of parsing, the colon is redundant to the
following INDENT. As I understand the history, their usage is
mandatory because of user testing done on ABC, which was one of a
host of influences on the design of Python.
For some reason, the dominant hominid specie of planet Earth is
uncomfortable without a certain level of redundancy. Some members
thereof have taken this predeliction to ridiculous extremes, creating
languages such as "Java".
Nanu-Nanu-ly y'rs
- Gordon
More information about the Python-list
mailing list