Skip to content

Commit 813db24

Browse files
authored
Add a warning block around the get_referrers() documentation (GH-24511)
1 parent d020496 commit 813db24

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Doc/library/gc.rst

Lines changed: 5 additions & 4 deletions
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)