First day beginner to python, add to counter after nested loop
timr at probo.com
Sat Nov 2 21:19:44 CET 2013
jonas.thornvall at gmail.com wrote:
>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.
Many editors do that. Vim, which is what I use, certainly does.
>I promise you it will save millions of hours of bug searching all over
>world in a month.
I suspect you meant "dozens" rather than "millions"...
Look, both schemes have their pitfalls. With an "end" requirement, it's
easy to have code where the indenting doesn't match the actual nesting, and
that causes human confusion. Without the "end" requirement, it's not hard
to type code where you forget to dedent. Those are just two manifestations
of the exact same problem. Neither scheme is provably superior to the
other. It's just a choice that a language designer has to make.
I happen to like Python's choice. You'll get used to it.
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-list