do/while structure needed

Antoon Pardon apardon at forel.vub.ac.be
Tue May 16 04:04:49 EDT 2006


Op 2006-05-15, Terry Reedy schreef <tjreedy at udel.edu>:
>
> "John Salerno" <johnjsal at NOSPAMgmail.com> wrote in message 
> news:4467786c$0$1956$c3e8da3 at news.astraweb.com...
>> Thanks, that looks pretty good. Although I have to say, a do/while
>> structure is the much more obvious way. I wonder why it hasn't been
>> added to the language.
>
> Been suggested many times, been considered, and rejected.  Easily similated 
> with while True: ... if exit_condition: break which also solves 'loop and a 
> half' problem, which is more common. Requires new keyword for little gain. 
> Etc.

It isn't rejected. PEP 315 is only deferred. Which as far as I
understand means it is postponed because other things seemed
more important.

-- 
Antoon Pardon



More information about the Python-list mailing list