Tech notes

Daily notes about my IT activities.

2012-06-03

python: repeat current "for" iteration

by hackprime

#!python
for i in range(0,100):
    while True:
        try:
            do_smth(i)
        except MyException:
            continue
        break

Source: How to retry after exception in python? — Stack Overflow