Add migration advice about the atexit module.
This commit is contained in:
parent
7d419abf3c
commit
edbdb24ac4
15
pep-0290.txt
15
pep-0290.txt
|
@ -395,6 +395,21 @@ Pattern::
|
|||
"foobar"[-3:] == "bar" --> "foobar".endswith("bar")
|
||||
|
||||
|
||||
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
|
||||
-------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue