On Tue, Sep 25, 2018 at 8:47 PM Mikhail V <mikhail...@gmail.com> wrote:
> As for statistics - IIRC someone gave statistics once, but the only > thing I can remember - > "while 1/True" is used quite a lot in the std lib, so the numbers > exceeded my expectation > (because I expected that it's used mostly in algorithms). > This proposal would be a lot stronger if you included those statistics in this thread and showed examples of stdlib code before/after the proposed syntax change. The meaning of "while" in natural language suggests a period of time or condition. It does not mean "forever". Therefore, it's not a good semantic fit. Python has shown a willingness to introduce new keywords: "async" and "await" were added in Python 3.5, which was released about 3 years ago. I imagine that a new loop keyword could be introduced in a backwards-compatible way. If you dislike the look of `while True:`, you can almost always hide it inside a generator and use a `for … in …` block with clearer meaning.
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/