News for hackers. Stuff that matters.

confusedcoder

Forgive me because I have used a similar idom when dealing with io.

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?