[Python-ideas] More classical for-loop

Pavol Lisy pavol.lisy at gmail.com
Fri Feb 17 03:34:51 EST 2017

On 2/17/17, Mikhail V <mikhailwas at gmail.com> wrote:

> Rationale
> -----------
> Removing the brackets will help concentrate on other
> parts of code [...]

Do you think that

    for i in steps * 10:
        for i in steps * 1-10:
            for i in steps * 1-10 ^ 2:

are better than

    for i in range(10):
        for i in range(1, 10):
            for i in range(1, 10, 2):

because brackets are gone?

I am asking because you could simply implement it with current syntax.
And I am not sure if removing bracket is really good enough.

We could use though experiment:
Is it good for you? Do you want to implement package and use "from
my_package import steps" and "for in steps" in your (not performance
critical) code?

BTW proposing new keyword is often bad idea because it break backward
compatibility. Sometimes existing keywords or operators could be used.

More information about the Python-ideas mailing list