[Python-ideas] Simpler syntax for basic iterations

Luciano Ramalho luciano at ramalho.org
Mon Oct 12 01:22:28 CEST 2015


On Sun, Oct 11, 2015 at 7:59 PM, Guido van Rossum <guido at python.org> wrote:
> Standard problems and examples like "print 'hello world' 10 times" or "draw
> an N-sided polygon" are designed to teach students those counting and
> indexing skills. It's backwards to request that the language support
> counting better so those examples will look simpler.

I agree that counting and indexing dominate many stupid introductory
programming exercises. And I praise the design of Python's `for`
command every time I teach the language or speak about it.

However, in Logo, using a command like the one below, there is
absolutely no indexing or counting in sight.

REPEAT 3 [FD 100 RT 120]

That's why we were advocating for a similar construct in Python.

But obviously you're not going to entertain the idea, so I'll drop it.

Cheers,

Luciano



>
> Python has so much richer data structures. Create problems to teach those!
>
> --
> --Guido van Rossum (python.org/~guido)
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/



-- 
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