[Python-ideas] More classical for-loop

Mikhail V mikhailwas at gmail.com
Fri Feb 17 21:27:00 EST 2017

A short Meta-note: I see most people are bottom-replying
and still many do top-reply, namely you Nick always do.
I dont know if there is a rule, but it makes quite hard to
manage/read post with mixed posting style.

On 17 February 2017 at 23:51, Nick Timkovich <prometheus235 at gmail.com> wrote:
> I think fundamentally by special-casing a for-loop variant,
> you have a construct with limited/no generality that's
> simply an additional burden to learn.

I see it is almost a tradition to give negative comments, and
that is ok in many cases. But I am slightly worried how *quick* you
make judgements. In what sense iteration over integer
is limited? It cannot write a program for you, no doubt.
If you look through examples I made, including
iterating over dictionary, you will see that you can do everything
with simple iteration, including cases where you do not
even have any sequence which you can put in, e.g. simple
loop with constant parameters, which comes in extremely
handy, e.g. in simple batch scripts.
Probably you mean that it can come in play with Python's
inner mechanics which will lead to performance loss -
yes, can be, but I was not going to argue that.

"burden to learn" - I hope you are not serious :)

More information about the Python-ideas mailing list