A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-August/047842.html below:

[Python-Dev] Deprecate sys.exitfunc?

[Python-Dev] Deprecate sys.exitfunc? [Python-Dev] Deprecate sys.exitfunc?Raymond Hettinger raymond.hettinger at verizon.net
Sun Aug 15 23:41:26 CEST 2004
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

More information about the Python-Dev mailing list

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