Skip to content
Merged
Changes from 1 commit
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
Next Next commit
gh-67056: document that registering/unregistering an atexit func from…
… within an atexit func is undefined
  • Loading branch information
iritkatriel committed May 14, 2023
commit d3127cdf54a8520e4d6e412c5a509d60a53a0053
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