From 43162e22c563a1cc0e9d9569b56a2d5e0c1bbbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Fri, 29 Jul 2011 18:04:24 +0200 Subject: Document that atexit execution order is undefined (#9788) --- Doc/library/atexit.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst index eab8cd9..fd884d7 100644 --- a/Doc/library/atexit.rst +++ b/Doc/library/atexit.rst @@ -12,7 +12,9 @@ The :mod:`atexit` module defines a single function to register cleanup functions. Functions thus registered are automatically executed upon normal -interpreter termination. +interpreter termination. The order in which the functions are called is not +defined; if you have cleanup operations that depend on each other, you should +wrap them in a function and register that one. This keeps :mod:`atexit` simple. .. seealso:: -- cgit v0.12