Skip to content

Commit

Permalink
pythongh-67056: document that registering/unregistering an atexit fun…
Browse files Browse the repository at this point in the history
…c from within an atexit func is undefined
  • Loading branch information
iritkatriel committed May 14, 2023
1 parent 080a596 commit d3127cd
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit d3127cd

Please sign in to comment.