diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-02-15 16:58:05 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-15 19:58:05 -0500 |
commit | b61b20dba554a74a2f9f0936b16dd669f93a561c (patch) | |
tree | 740f9ec3180ec4b5292700daf67f2d6e4abeafb4 | |
parent | d0d4d30882fe3ab9b1badbecf5d15d94326fd13e (diff) | |
download | cpython-git-b61b20dba554a74a2f9f0936b16dd669f93a561c.tar.gz |
Add a warning block around the get_referrers() documentation (GH-24511) (GH-24544)
(cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
-rw-r--r-- | Doc/library/gc.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst index 1f09ed52ce..7ee71dc446 100644 --- a/Doc/library/gc.rst +++ b/Doc/library/gc.rst @@ -132,10 +132,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. .. function:: get_referents(*objs) |