REPEAT... UNTIL ?

Gustavo Cordova gcordova at hebmex.com
Wed Jul 3 15:17:49 EDT 2002


> 
> Hi,
> 
> what do you think about adding "repeat .... until" to python syntax?
> Often a "repeat-until" is better to use than a "while" loop.
> Guido 8-) ???
> 
> Ingo
> 

Given the following:

   bexpr === boolean expression, exit loop when true.

then:

"""
repeat:
   ...
   ...
   ...
   until bexpr
"""

would be exactly the same as:

"""
while 1:
  ...
  ...
  ...
  if bexpr: break
"""

no?

-gustavo





More information about the Python-list mailing list