Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Doc/library/atexit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ internal error is detected, or when :func:`os._exit` is called.
This function returns *func*, which makes it possible to use it as a
decorator.

The effect of calling :func:`register` from another registered cleanup
function is undefined.


.. function:: unregister(func)

Expand All @@ -55,6 +58,8 @@ internal error is detected, or when :func:`os._exit` is called.
comparisons (``==``) are used internally during unregistration, so function
references do not need to have matching identities.

The effect of calling :func:`unregister` from a registered cleanup function
is undefined.

.. seealso::

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Document that the efect of registering or unregistering an :mod:`atexit`
cleanup function from within a registered cleanup function is undefined.