gh-120937: Reference weakref from the `__del__` documentation (#120940)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
chaen 2024-06-26 22:07:09 +02:00 committed by GitHub
parent 22b0de2755
commit 1c13b29d54
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -1667,6 +1667,8 @@ Basic customization
It is not guaranteed that :meth:`__del__` methods are called for objects
that still exist when the interpreter exits.
:class:`weakref.finalize` provides a straightforward way to register
a cleanup function to be called when an object is garbage collected.
.. note::