summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2000-07-05 23:11:26 (GMT)
committerSkip Montanaro <skip@pobox.com>2000-07-05 23:11:26 (GMT)
commit09151650969ce9f2c1f3293b361004b41f9e8f4a (patch)
tree61cc2ad128c20632107aab705f3cf4e94fab9aab /Doc
parent54925f98d3a685ba5949b064d21521d089cb3efa (diff)
downloadcpython-09151650969ce9f2c1f3293b361004b41f9e8f4a.zip
cpython-09151650969ce9f2c1f3293b361004b41f9e8f4a.tar.gz
cpython-09151650969ce9f2c1f3293b361004b41f9e8f4a.tar.bz2
added warning about incompatibility with other codes' use of sys.exitfunc.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libatexit.tex8
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/lib/libatexit.tex b/Doc/lib/libatexit.tex
index df0cdd4..e74cc74 100644
--- a/Doc/lib/libatexit.tex
+++ b/Doc/lib/libatexit.tex
@@ -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