[Python-ideas] Simpler syntax for basic iterations

Sven R. Kunze srkunze at mail.de
Tue Oct 13 19:59:55 CEST 2015


On 13.10.2015 00:21, Ben Finney wrote:
> Since this is quite clearly expressed in existing Python syntax with::
>
>      for __ in range(3):
>          forward(100)
>          turn_left(120)
>
> the single use case doesn't IMO argue for benefit sufficient to overcome
> the enormous burden of new syntax.

I still like instead of the cryptic __ or _

for each in range(3):
     dosomething

To me, that reads like a normal English statement.

Best,
Sven


More information about the Python-ideas mailing list