[Python-Dev] PEP-419: Protecting cleanup statements from interruptions
Benjamin Peterson
benjamin at python.org
Sun Apr 8 23:42:50 CEST 2012
2012/4/8 Paul Colomiets <paul at colomiets.name>:
> Function 'sys.setcleanuphook'
> -----------------------------
>
> A new function for the ``sys`` module is proposed. This function sets
> a callback which is executed every time ``f_in_cleanup`` becomes
> false. Callbacks get a frame object as their sole argument, so that
> they can figure out where they are called from.
Calling a function every time you leave a finally block? Isn't that a
bit expensive?
--
Regards,
Benjamin
More information about the Python-Dev
mailing list