[Python-checkins] python/nondist/peps pep-0290.txt,1.14,1.15
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Mon Aug 16 05:14:55 CEST 2004
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16563
Modified Files:
pep-0290.txt
Log Message:
Add migration advice about the atexit module.
Index: pep-0290.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0290.txt,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** pep-0290.txt 4 May 2004 08:24:05 -0000 1.14
--- pep-0290.txt 16 Aug 2004 03:14:53 -0000 1.15
***************
*** 396,399 ****
--- 396,414 ----
+ The ``atexit`` Module
+ '''''''''''''''''''''
+
+ The atexit module supports multiple functions to be executed upon
+ program termination. Also, it supports parameterized functions.
+ Unfortunately, its implementation conflicts with the sys.exitfunc
+ attribute which only supports a single exit function. Code relying
+ on sys.exitfunc may interfere with other modules (including library
+ modules) that elect to use the newer and more versatile atexit module.
+
+ Pattern::
+
+ sys.exitfunc = myfunc --> atexit.register(myfunc)
+
+
Python 1.5 or Later
-------------------
More information about the Python-checkins
mailing list