by confusedcoder · 7y ago · 0 comments
I do something like:
for i=0; i<3; i++:
try:
doSomeIoWork()
catch:
if i<3:
# maybe some network/disk issues retry?
sleep SOME_TIME * i;
continue;
else:
# tried too many times now quit
raise
Am I doing something stupid here? for i=0; i<3; i++:
doSomething();
if i<3:
continue;
else:
break;