diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-29 17:52:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-29 17:52:27 (GMT) |
commit | 08aa26e4355da6f916da0c97d00774800ee0fc46 (patch) | |
tree | 45cc9a312a12db82f88c0485e4e8da045ed2977c /Doc | |
parent | d9fc4c3deb617beb1d0bbfdb4efc905a4192ff0a (diff) | |
download | cpython-08aa26e4355da6f916da0c97d00774800ee0fc46.zip cpython-08aa26e4355da6f916da0c97d00774800ee0fc46.tar.gz cpython-08aa26e4355da6f916da0c97d00774800ee0fc46.tar.bz2 |
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26956)
(cherry picked from commit 12803c59d54ff1a45a5b08cef82652ef199b3b07)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/atexit.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Doc/library/atexit.rst b/Doc/library/atexit.rst index e6fa33a..f7f0381 100644 --- a/Doc/library/atexit.rst +++ b/Doc/library/atexit.rst @@ -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:: |