[RFC] Add run_cleanup, do_with_cleanup
Martin Pool
mbp at canonical.com
Thu Sep 24 07:55:41 BST 2009
2009/9/24 Stephen J. Turnbull <stephen at xemacs.org>:
> I believe Guido acknowledged not allowing the more compact notation in
> the first place to be excessive caution, but it's not impossible to
> distinguish exceptions raised by try_func from those raised by
> final_func.
>
> So what's the problem? You want to do this without fixing all the
> broken try ... finally blocks?
It's not _impossible_, we just don't want to add boilerplate to
everything that uses a try/finally block. There are many more of them
than there are distinct types of cleanup to run.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list