On Fri, 03 Dec 2010 14:31:43 +0000, Mark Wooding wrote: > The most obvious improvement is resumable exceptions.
This is probably what I had in mind but I just couldn't explain it the way you did below. > > In general, recovering from an exceptional condition requires three > activities: > > * doing something about the condition so that the program can continue > running; > > * identifying some way of rejoining the program's main (unexceptional) > flow of control; and > > * actually performing that transfer, ensuring that any necessary > invariants are restored. This really sums up my thoughts about exceptions better than I could have explained! I just felt instinctively that I had missed something, but it appears to be a break in logic of the code somewhere which I thought was my fault. Seems that exception handling requires a lot of forethought since the control of program execution breaks at the point of exception with no obvious way to rejoin it seamlessly whereas with an error, a simple if condition could handle the error state and resume execution from that point forward. This is the main reason why I think I used simple error codes to handle certain recoverable conditions and avoided exceptions. I quite enjoyed your post. Thank you for explaining a lot of issues which I probably could not have figured out on my own. -- Harishankar (http://harishankar.org http://lawstudentscommunity.com) -- http://mail.python.org/mailman/listinfo/python-list