[issue34332] Suggestion for a new loop type

2018-08-04 Thread Stéphane Wirtel
Stéphane Wirtel added the comment: You can also use a context manager and the `with` statement. -- nosy: +matrixise ___ Python tracker ___

[issue34332] Suggestion for a new loop type

2018-08-03 Thread Zachary Ware
Zachary Ware added the comment: Ideas like this are better sent to the python-id...@python.org mailing list for discussion rather than immediately opening an issue. Note though that I think this has a low chance of acceptance; there's a very high bar to clear to add syntax, even higher for

[issue34332] Suggestion for a new loop type

2018-08-03 Thread Happy Fakeboulder
New submission from Happy Fakeboulder : A "while-except" loop, in which it acts like a do-while loop from other languages, except the condition is "did an exception occur during the execution of the iteration". One could specify a type of exception at the top, similar to an except block