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

Antoon Pardon antoon.pardon at rece.vub.ac.be
Wed Oct 30 08:01:45 EDT 2013


Op 30-10-13 08:07, Tim Roberts schreef:
> 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.

Because it is a pain in the ass. Now suddenly my program doesn't work
because I somehow inserted a tab instead of spaces.

The end would also gives extra protection against faulty manipulations.
I have at one time accidently copied a function partly further below.
Because python doesn't need an end, the compilor was unable to detect
this was only part of a function which caused a bug which was harder to
find.

Python made it's choice and I can live with that, but telling people
who prefer it had made an other choice that their brain is poisoned,
only shows you are unable to see the disadvantages.

-- 
Antoon Pardon



More information about the Python-list mailing list