[Python-ideas] Simpler syntax for basic iterations
Luciano Ramalho
luciano at ramalho.org
Mon Oct 12 05:03:48 CEST 2015
On Sun, Oct 11, 2015 at 11:12 PM, Guido van Rossum <guido at python.org> wrote:
> Heh. "The whole point (15 years ago) of range() was to *avoid* needing
> syntax to specify a loop over numbers." I guess I'm nothing if not
> consistent. :-)
Andre and I are not arguing for a special syntax to loop over numbers.
We are arguing for special syntax to repeat a block a number of times.
No indexing at all, and no variables need to be involved.
for 3:
fd(100)
lt(120)
Best,
Luciano
--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg
More information about the Python-ideas
mailing list