[Python-ideas] "while:" for the loop

Michael Selik mike at selik.org
Wed Sep 26 12:23:48 EDT 2018

On Wed, Sep 26, 2018, 9:42 AM Tobias Kohn <kohnt at tobiaskohn.ch> wrote:

> Although I doubt it will really make it into Python's grammar, I am all +1
> for the idea of having "repeat" as a loop keyword in Python.  Actually, I
> have been using "repeat" as a keyword in Python for quite some time now,
> and found it not only convenient, but also a great help in education.
Guido has repeatedly (haha) rejected this proposal [0]. He has written that
he considered it, but decided that in practical code one almost always
loops over data, and does not want an arbitrary number of iterations. The
range object solves this problem.

You might notice that a repeat keyword appears in many graphics-focused
child education languages, but not many "serious" languages.

[0] I remember at least two times, but can't find them with search at the

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180926/5771d8d5/attachment.html>

More information about the Python-ideas mailing list