Grouping code by indentation - feature or ******?

Ron_Adam radam2 at tampabay.rr.com
Sat Mar 26 12:36:51 EST 2005


On Fri, 25 Mar 2005 11:31:33 -0800, James Stroud
<jstroud at mbi.ucla.edu> wrote:

>On Friday 25 March 2005 08:39 am, Ivan Van Laningham wrote:
>> As far as grouping by indentation goes, it's why I fell in love with
>> Python in the first place.  Braces and so on are just extraneous cruft
>> as far as I'm concerned.  It's the difference between Vietnamese verbs
>> and Latin verbs;-)
>
>Say I buy into the indentation ideology. Python then has this inconsistency: :
>
>Why do we need : at the end of our if and for loops? I spend approximately 6 
>minutes/100 lines of code going back and finding all of the times I missed :. 
>Is it for cheating?
>
>if False: print ":"
>
>Now, what happened to the whitespace idea here? This code seems very 
>unpythonic. I think : is great for slices and lamda where things go on one 
>line, but to require it to specify the start of a block of code seems a 
>little perlish.

You really don't need a period at the end of a sentences  A double
space and a capital is enough to tell you where one sentence ends and
the next one starts  Yet, I find the presence of the period makes
written language easier to read in the same way the colon in python
makes code easer to read

;)

Ron




More information about the Python-list mailing list