fun with nested loops

Daniel dalist0 at
Wed Aug 31 15:07:03 EDT 2011

> Do you only ever have one top-level loop that you would be naming? If
no, unfortunately not. The rough structure is several loops deep, and
I need to break/continue/restart many of them.
Continue is used more than break, because most of the time that I find
some strange value, I'd just _continue_ a few levels up
to restart the current measurements.

for some configurations
    while not enough data collected
        while not in the right state
            for steps  in steps to bring the system to the right state
                if the system is bad, break out of all loops
                if it just need to be reset, just redo the steps
                if it is ok, go to the next while loop
        while in the right state
            steps to do some measurements

More information about the Python-list mailing list