[Python-Dev] PEP-419: Protecting cleanup statements from interruptions (original) (raw)
Benjamin Peterson benjamin at python.org
Sun Apr 8 23:42:50 CEST 2012
- Previous message: [Python-Dev] PEP-419: Protecting cleanup statements from interruptions
- Next message: [Python-Dev] PEP-419: Protecting cleanup statements from interruptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 timefincleanup
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
- Previous message: [Python-Dev] PEP-419: Protecting cleanup statements from interruptions
- Next message: [Python-Dev] PEP-419: Protecting cleanup statements from interruptions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]