If you don't like:

while True:
    ...
    if whatever:
        break

One thing I've seen people do is:

condition = True
while condition:
    ...
    condition = whatever

You can use it if you really hate `while True` loops with `break`.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/4BSR3YI7HBD3DOAXQ7GA7XCVJUP7Z4B2/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to