by formerly_proven · 5y ago · 0 comments
try:
foobar
delegate handle_stuff:
delegate handler_factory(something):
except Foo:
...
else:
...
finally
...
Where "delegate handle_stuff" means that for any exception handle_stuff is called with the exception tuple and the exception is considered handled if it returns truthy. "delegate" of course takes an expression so that you can have Proper Adult Fun Handling Exceptions. for (i = 0, i < n; i++) { a[i] }
- they're simpler to reason about because they restrict the conceptual operational space.