summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2006-03-07 09:46:03 (GMT)
committerBarry Warsaw <barry@python.org>2006-03-07 09:46:03 (GMT)
commitd3c38ff7f832f60830532524e07a5e11be749d7e (patch)
treec1bb3343d60f4c646a8933057b19206040c2b633 /Doc/lib
parent995acdf308919b61dd94170925e511a926279dbc (diff)
downloadcpython-d3c38ff7f832f60830532524e07a5e11be749d7e.zip
cpython-d3c38ff7f832f60830532524e07a5e11be749d7e.tar.gz
cpython-d3c38ff7f832f60830532524e07a5e11be749d7e.tar.bz2
SF patch #1443865; gc.get_count() added and optional argument 'generation'
added to gc.collect(). Updated docs, unit test, and NEWS entry. (Also, fixed a typo in NEWS.)
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libgc.tex16
1 files changed, 13 insertions, 3 deletions
diff --git a/Doc/lib/libgc.tex b/Doc/lib/libgc.tex
index e53e2a8..54ca26c 100644
--- a/Doc/lib/libgc.tex
+++ b/Doc/lib/libgc.tex
@@ -32,9 +32,13 @@ Disable automatic garbage collection.
Returns true if automatic collection is enabled.
\end{funcdesc}
-\begin{funcdesc}{collect}{}
-Run a full collection. All generations are examined and the
-number of unreachable objects found is returned.
+\begin{funcdesc}{collect}{\optional{generation}}
+With no arguments, run a full collection. The optional argument
+\var{generation} may be an integer specifying which generation to collect
+(from 0 to 2). A ValueError is raised if the generation number is invalid.
+The number of unreachable objects found is returned.
+
+\versionchanged[The optional \var{generation} argument was added]{2.5}
\end{funcdesc}
\begin{funcdesc}{set_debug}{flags}
@@ -76,6 +80,12 @@ examined, then generation \code{1} is examined as well. Similarly,
\code{1} before collecting generation \code{2}.
\end{funcdesc}
+\begin{funcdesc}{get_count}{}
+Return the current collection counts as a tuple of
+\code{(\var{count0}, \var{count1}, \var{count2})}.
+\versionadded{2.5}
+\end{funcdesc}
+
\begin{funcdesc}{get_threshold}{}
Return the current collection thresholds as a tuple of
\code{(\var{threshold0}, \var{threshold1}, \var{threshold2})}.