bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26957)

(cherry picked from commit 12803c59d5)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2021-06-29 10:53:07 -07:00 committed by GitHub
parent 3ba65cdcef
commit 02859df105
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -48,11 +48,12 @@ internal error is detected, or when :func:`os._exit` is called.
.. function:: unregister(func)
Remove *func* from the list of functions to be run at interpreter
shutdown. After calling :func:`unregister`, *func* is guaranteed not to be
called when the interpreter shuts down, even if it was registered more than
once. :func:`unregister` silently does nothing if *func* was not previously
registered.
Remove *func* from the list of functions to be run at interpreter shutdown.
:func:`unregister` silently does nothing if *func* was not previously
registered. If *func* has been registered more than once, every occurrence
of that function in the :mod:`atexit` call stack will be removed. Equality
comparisons (``==``) are used internally during unregistration, so function
references do not need to have matching identities.
.. seealso::

View file

@ -0,0 +1 @@
Clarify that atexit uses equality comparisons internally.