0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00

added warning about incompatibility with other codes' use of sys.exitfunc.

This commit is contained in:
Skip Montanaro 2000-07-05 23:11:26 +00:00
parent 54925f98d3
commit 0915165096

View File

@ -20,6 +20,14 @@ This is an alternate interface to the functionality provided by the
\code{sys.exitfunc} variable.
\withsubitem{(in sys)}{\ttindex{exitfunc}}
Note: This module is unlikely to work correctly when used with other code
that sets \code{sys.exitfunc}. In particular, other core Python modules are
free to use \module{atexit} without the programmer's knowledge. Authors who
use \code{sys.exitfunc} should convert their code to use
\module{atexit} instead. The simplest way to convert code that sets
\code{sys.exitfunc} is to import \module{atexit} and register the function
that had been bound to \code{sys.exitfunc}.
\begin{funcdesc}{register}{func\optional{, *args\optional{, **kargs}}}
Register \var{func} as a function to be executed at termination. Any
optional arguments that are to be passed to \var{func} must be passed