First day beginner to python, add to counter after nested loop
jonas.thornvall at gmail.com
jonas.thornvall at gmail.com
Wed Oct 30 11:54:58 EDT 2013
Den onsdagen den 30:e oktober 2013 kl. 16:50:43 UTC+1 skrev Grant Edwards:
> On 2013-10-30, Antoon Pardon <antoon.pardon at rece.vub.ac.be> wrote:
>
> > 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.
>
>
>
> Then don't do that.
>
>
>
> I'm only half-kidding. Inserting incorrect tokens into program source
>
> breaks programs in all languages. The tricky bit is that in many
>
> editors spaces and tabs look the same. You can pick an editor that
>
> provides a visual difference, or you can pick an editor that always
>
> does the right thing, or you can stick with it until your fingers
>
> learn to do the right thing.
>
>
>
> > 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.
>
>
>
> Those of us who've been using Python for more than a few days think it
>
> is you who are unable to see the advantages. ;)
>
>
>
> Whether allowing indentation via either tabs or spaces was a
>
> fundamental design flaw has long been debated. Personally, I think
>
> tabs should be outlawed in all source code...
>
>
>
> --
>
> Grant Edwards grant.b.edwards Yow! Uh-oh!! I'm having
>
> at TOO MUCH FUN!!
>
> gmail.com
I think the idea with tab indentation would been it is an easy road for automation. I think it is easily that project goes anal when let over to code monkeys, maybe that is the case.
More information about the Python-list
mailing list