Colon and underscores

Paul Prescod paulp at ActiveState.com
Sat Jul 28 15:24:21 EDT 2001


Igor wrote:
> 
> It would be really nice to know the reasons behind some syntax
> features.
> 
> What is the real purpose of the colon ":" after each if, def, etc...
> Is it really required and cannot be made optional?

It makes Python easier to read. According to Python lore, this is one of
the few things in computer language history that was actually usability
tested. 

> Why__ do __Python__ programs __need to __look__ like __swarms__ of
> __underscores ? Is it OK that one must dig in underscores instead of
> having a normal English word for private symbols, for example?

You are not supposed to invoke these methods directly. The __ makes that
clear.

-- 
Take a recipe. Leave a recipe.  
Python Cookbook!  http://www.ActiveState.com/pythoncookbook




More information about the Python-list mailing list