summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-04-08 16:39:48 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-04-08 16:39:48 (GMT)
commit0f81ab6d8895fb6a0b09d517b872a7816060914d (patch)
treec172bc134bb36ae75702cb40ce24a262fe63c08c /Doc/lib
parentfb2ab4d5ae048ee29e98dee30b9f68652a34da85 (diff)
downloadcpython-0f81ab6d8895fb6a0b09d517b872a7816060914d.zip
cpython-0f81ab6d8895fb6a0b09d517b872a7816060914d.tar.gz
cpython-0f81ab6d8895fb6a0b09d517b872a7816060914d.tar.bz2
Finished implementing gc.get_referrents(): dealt with error and end
cases, wrote docs, added a test.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libgc.tex13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/lib/libgc.tex b/Doc/lib/libgc.tex
index 310c582..eea8d8c 100644
--- a/Doc/lib/libgc.tex
+++ b/Doc/lib/libgc.tex
@@ -99,6 +99,19 @@ objects, call \function{collect()} before calling
\versionadded{2.2}
\end{funcdesc}
+\begin{funcdesc}{get_referrents}{*objs}
+Return a list of objects directly referred to by any of the arguments.
+The referrents returned are those objects visited by the arguments'
+C-level \cfunction{tp_traverse} methods (if any), and may not be all
+objects actually directly reachable. \cfunction{tp_traverse} methods
+are supported only by objects that support garbage collection, and are
+only required to visit objects that may be involved in a cycle. So,
+for example, if an integer is directly reachable from an argument, that
+integer object may or may not appear in the result list.
+
+\versionadded{2.3}
+\end{funcdesc}
+
The following variable is provided for read-only access (you can
mutate its value but should not rebind it):