[Python-ideas] "while:" for the loop
Hans Polak
hpolak at polak.es
Thu Sep 27 03:06:47 EDT 2018
On 26/09/18 18:23, Michael Selik wrote:
> 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.
Years ago, I proposed a do...loop. Guido rejected that.
As an aside, here's a pattern you can use for do...loops.
def do_loop():
if True:
return True return False while do_loop():
pass
Cheers,
Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180927/a3497c2a/attachment.html>
More information about the Python-ideas
mailing list