summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-02-15 23:12:34 (GMT)
committerGitHub <noreply@github.com>2021-02-15 23:12:34 (GMT)
commitf30aa3c44f807da5db9b053fba96578a8210a3c2 (patch)
tree91f9c72257bd5689a88610b343c10063d2221e09 /Doc
parentede1ff226c9ef4efd053109c69b4e33f75b2b17b (diff)
downloadcpython-f30aa3c44f807da5db9b053fba96578a8210a3c2.zip
cpython-f30aa3c44f807da5db9b053fba96578a8210a3c2.tar.gz
cpython-f30aa3c44f807da5db9b053fba96578a8210a3c2.tar.bz2
Add a warning block around the get_referrers() documentation (GH-24511)
(cherry picked from commit 813db24f7c2c536d587d1832c3c52b44fa9e242e) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/gc.rst9
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/gc.rst b/Doc/library/gc.rst
index adaa302..073391d 100644
--- a/Doc/library/gc.rst
+++ b/Doc/library/gc.rst
@@ -135,10 +135,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)