The documentation for the atexit module (introduced in Py2.0) states: """Note: This module is unlikely to work correctly when used with other code that sets sys.exitfunc. In particular, other core Python modules are free to use atexit without the programmer's knowledge. Authors who use sys.exitfunc should convert their code to use atexit instead. The simplest way to convert code that sets sys.exitfunc is to import atexit and register the function that had been bound to sys.exitfunc.""" Can we strengthen this by deprecating sys.exitfunc? The atexit module does attempt to co-exist by introducing code to register a function in sys.exitfunc if it were defined before "import atexit" was called. However, this is unreliable because it depends on import order and the library is free to introduce an earlier "import atexit" which would break code relying on the co-existance mechanism. Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4