mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add a warning block around the get_referrers() documentation (GH-24511)
(cherry picked from commit 813db24f7c
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
aa967ec4d4
commit
4cc9e2348b
1 changed files with 5 additions and 4 deletions
|
@ -137,10 +137,11 @@ The :mod:`gc` module provides the following functions:
|
|||
resulting referrers. To get only currently live objects, call :func:`collect`
|
||||
before calling :func:`get_referrers`.
|
||||
|
||||
Care must be taken when using objects returned by :func:`get_referrers` because
|
||||
some of them could still be under construction and hence in a temporarily
|
||||
invalid state. Avoid using :func:`get_referrers` for any purpose other than
|
||||
debugging.
|
||||
.. warning::
|
||||
Care must be taken when using objects returned by :func:`get_referrers` because
|
||||
some of them could still be under construction and hence in a temporarily
|
||||
invalid state. Avoid using :func:`get_referrers` for any purpose other than
|
||||
debugging.
|
||||
|
||||
.. audit-event:: gc.get_referrers objs gc.get_referrers
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue