Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe1e298

Browse files
committed
Document that atexit execution order is undefined (#9788)
1 parent 63b18a4 commit fe1e298

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Doc/library/atexit.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
The :mod:`atexit` module defines functions to register and unregister cleanup
1111
functions. Functions thus registered are automatically executed upon normal
12-
interpreter termination.
12+
interpreter termination. The order in which the functions are called is not
13+
defined; if you have cleanup operations that depend on each other, you should
14+
wrap them in a function and register that one. This keeps :mod:`atexit` simple.
1315

1416
Note: the functions registered via this module are not called when the program
1517
is killed by a signal not handled by Python, when a Python fatal internal error

0 commit comments

Comments
 (0)