[Python-Dev] PEP 3142: Add a "while" clause to generator expressions

Nick Coghlan ncoghlan at gmail.com
Thu Jan 22 07:40:34 CET 2009

Cameron Simpson wrote:
> On 21Jan2009 14:02, Tres Seaver <tseaver at palladion.com> wrote:
> | Vitor Bosshard wrote:
> | > BTW, there is already an "until" keyword in python, it's called "while not" ;)
> | 
> | 'until' is used at least in some languages (Pascal, Modula*, maybe Ada?)
> | for a "terminate at bottom" loop (one guaranteed to run at least once):
> |  in such cases, the predicate has the negative sense.
> This is a particular flavour of "do ... while" which just happens
> to read a little better in English. It does sometimes bother me that
> Python doesn't have do...while when I find my self replicating the loop
> bottom above the loop.

Adding a do-while construct to Python has already been proposed:

It was merely deferred due to only garnering lukewarm support and lack
of a reference implementation rather than actually being rejected:


Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia

More information about the Python-Dev mailing list