Paul McGuire wrote: > I still think there are savings to be had by looping inside the > try-except block, which avoids many setup/teardown exception handling > steps. This is not so pretty in another way (repeated while on > check()), but I would be interested in your timings w.r.t. your current > code.
Your suggested optimisation worked nicely. It shaved 0.02 seconds from a loop over 10000 iterators, and about 0.002 seconds from a loop over 1000 iterators. -- http://mail.python.org/mailman/listinfo/python-list