Loop until condition is true

D H d at e.f
Sun Jun 19 22:21:18 EDT 2005


Joseph Garvin wrote:
> Peter Otten wrote:
> 
>> I found 136 occurrences of "do {" versus 754 of "while (" and 1224 of 
>> "for
>> (" in the Python 2.4 source, so using these rough estimates do-while 
>> still
>> qualifies as "rarely used".
>>
>> Peter
>>
>>  
>>
> That's 136 times you'd have to use an ugly hack instead. I definitely 
> wouldn't mind an until or do/while.

Yeah a do while loop was proposed over 2 years ago, but nothing ever 
came of it:
http://www.python.org/peps/pep-0315.html
It's been discussed for many many years, and again recently:
http://mail.python.org/pipermail/python-dev/2005-June/054167.html



More information about the Python-list mailing list