Terry Reedy wrote: > "John Salerno" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> 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.
I know, I remember a discussion about it a while back. But IMO, at least, a do/while structure seems much cleaner and more readable than a while loop with an embedded if and break statement. -- http://mail.python.org/mailman/listinfo/python-list