do while loop

Thomas Nelson thn at mail.utexas.edu
Wed Apr 26 17:46:34 EDT 2006


My usual way of emulating do-while is:

started = False
while (someBoolean or not started):
    started = True
    #whatever else

This simply assures "whatever else" happens at least once.  Is this
Pythonic?

THN




More information about the Python-list mailing list