First day beginner to python, add to counter after nested loop

jonas.thornvall at gmail.com jonas.thornvall at gmail.com
Wed Oct 30 06:08:11 EDT 2013


Den onsdagen den 30:e oktober 2013 kl. 08:07:31 UTC+1 skrev Tim Roberts:
> jonas.thornvall at gmail.com wrote:
> 
> >
> 
> >Why did Python not implement end... The end is really not necessary for
> 
> >the programming language it can be excluded, but it is a courtesy to
> 
> >the programmer and could easily be transformed to indents automaticly,
> 
> >that is removed before the compiliation/interpretation of code.  
> 
> 
> 
> You only say that because your brain has been poisoned by languages that
> 
> require some kind of "end".  It's not necessary, and it's extra typing. 99%
> 
> of programmers do the indentation anyway, to make the program easy to read,
> 
> so why not just make it part of the syntax?  That way, you don't
> 
> accidentally have the indentation not match the syntax.
> 
> -- 
> 
> Tim Roberts, timr at probo.com
> 
> Providenza & Boekelheide, Inc.

Well Tim ***one could argue*** why not do a (i think it is called parser) that react to "loop", "end" and "function". And lazy like me do not have to think about "what is not part of program".

I certainly do not like the old bracket style it was a catastrophe, but in honesty the gui editor of python should have what i propose, a parser that indent automaticly at loops, functions and end. I promise you it will save millions of hours of bug searching all over world in a month.



More information about the Python-list mailing list