On Tue, 24 Jan 2012 21:53:49 -0500
Vince
On Tue, Jan 24, 2012 at 8:19 PM, Mike Meyer
wrote: Exception handling and retrying the code that caused the exception are part of the same concept. There is value in being able to express that concept directly with a single construct.
It seems to me that combining looping and exception handling in the same construct makes code harder to read. When you come across any looping construct, you know immediately that the following block could occur any number of times, depending on the line where the construct starts. In the case of try/except/retry, it may come as a surprise that the block can actually repeat.
Except the block in the try *doesn't* repeat. That block is only
executed once. It may be *started* multiple times if there are
exceptional conditions, but once it finishes executing, it's
over. That's sort of the point.