Skip to content

Commit b61b20d

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

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
@@ -132,10 +132,11 @@ The :mod:`gc` module provides the following functions:
132132
resulting referrers. To get only currently live objects, call :func:`collect`
133133
before calling :func:`get_referrers`.
134134

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

140141

141142
.. function:: get_referents(*objs)

0 commit comments

Comments
 (0)