Why aren't colons optional?

Steve Holden sholden at holdenweb.com
Wed Jan 23 14:13:45 CET 2002


"Edward K. Ream" <edream at tds.net> wrote in message
news:3C49FED0.8C0F254E at tds.net...
> Hi all,
>
> Why are colons required after def, elif, else, except, finally, for, if,
> try and while?  One would think the colon would be optional when the
> colon is followed by a newline.
>
[20 lines snipped, and forty bicycle-shed posts ignored...]

Because this is Python. More briefly: because.

regards
 Steve
--
Consulting, training, speaking: http://www.holdenweb.com/
Python Web Programming: http://pydish.holdenweb.com/pwp/








More information about the Python-list mailing list