[Python-ideas] Making colons optional?

Riobard Zhan yaogzhan at gmail.com
Fri Feb 6 15:37:08 CET 2009

On 6-Feb-09, at 3:53 AM, Scott Dial wrote:

> Riobard Zhan wrote:
>> Your strong association with "here comes a suite" should come from
>> indentation, that's how Python works.
> Your argument makes no sense, since an indention does not  
> automatically
> indicate a suite.

Indentation does not automatically indicate a statement, either. Why  
do you omit semicolons?

> Huh? You want to add more line noise? The colon is a pleasant  
> compromise
> between the "please give me some indicator that is visual" and the
> "please don't make me type extra characters" crowds. Your arguments  
> that
> people who don't want to type them shouldn't don't hold up when you
> consider that other people have to read the code, and they are not  
> given
> the option to put the colons back in upon reading it. And there is the
> simple fact that a piece of code will be read more often than it is  
> ever
> wrote. Does your burden out weigh all of the potential readers of  
> your code?

So you do agree colons are line noise? Colons are unpleasant for me  
not because I have to type them (though this certainly is a factor,  
too), but I have to *read* them every time I read Python code and they  
disrupt the mental flow.

You are assuming colons improve readability, which I disagree.  
Readability comes from indentation, not from punctuation. If you logic  
holds, you might have to use semicolons as well. 

More information about the Python-ideas mailing list