[Python-Dev] Deprecate sys.exitfunc? (original) (raw)
Guido van Rossum guido at python.org
Tue Aug 17 03:21:55 CEST 2004
- Previous message: [Python-Dev] Deprecate sys.exitfunc?
- Next message: [Python-Dev] Deprecate sys.exitfunc?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Multiple well-written modules can use sys.exitfunc in a way that is compatible. atexit is merely a glue to discourage non-well-written modules. I'd say that atexit should be encouraged but there is nothing wrong with using sys.exitfunc directly, if one is aware of the common patching pattern: "save-old-value, replace-with-my-function, upon-call-invoke-saved-old-value".
But why offer two ways of doing the same thing? Apart from b/w compatibility, what's the advantage of using sys.exitfunc directly?
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Deprecate sys.exitfunc?
- Next message: [Python-Dev] Deprecate sys.exitfunc?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]