[Python-ideas] "while:" for the loop
mertz at gnosis.cx
Wed Sep 26 12:29:48 EDT 2018
We also have:
from itertools import count
for i in count():
If you want to keep track of how close to infinity you are. :-)
On Wed, Sep 26, 2018, 12:24 PM Michael Selik <mike at selik.org> wrote:
> 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
> Guido has repeatedly (haha) rejected this proposal . 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.
>  I remember at least two times, but can't find them with search at the
> Python-ideas mailing list
> Python-ideas at python.org
> Code of Conduct: http://python.org/psf/codeofconduct/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas