Skip to content

Commit f30aa3c

Browse files
Add a warning block around the get_referrers() documentation (GH-24511)
(cherry picked from commit 813db24) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
1 parent ede1ff2 commit f30aa3c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/library/gc.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ The :mod:`gc` module provides the following functions:
135135
resulting referrers. To get only currently live objects, call :func:`collect`
136136
before calling :func:`get_referrers`.
137137

138-
Care must be taken when using objects returned by :func:`get_referrers` because
139-
some of them could still be under construction and hence in a temporarily
140-
invalid state. Avoid using :func:`get_referrers` for any purpose other than
141-
debugging.
138+
.. warning::
139+
Care must be taken when using objects returned by :func:`get_referrers` because
140+
some of them could still be under construction and hence in a temporarily
141+
invalid state. Avoid using :func:`get_referrers` for any purpose other than
142+
debugging.
142143

143144

144145
.. function:: get_referents(*objs)

0 commit comments

Comments
 (0)