[Python-ideas] A suggestion for a do...while loop
Chris Angelico
rosuav at gmail.com
Mon Jun 26 02:14:54 EDT 2017
On Mon, Jun 26, 2017 at 4:08 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> If we wanted to allow that to be expressed literally, we could
>> probably special case the "while not break" keyword sequence as a do
>> loop:
>>
>> while not break:
>> # Setup
>> if condition: break
>> # Loop continuation
>
>
> We would then also need 'while not return:'
And for completeness, "while not throw:".
ChrisA
More information about the Python-ideas
mailing list