]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-112502: Docs: Improve docs for gc.collect method (#112562)
authorAlperen Serkan Aksöz <61659936+Sekomer@users.noreply.github.com>
Thu, 30 Nov 2023 21:04:00 +0000 (00:04 +0300)
committerGitHub <noreply@github.com>
Thu, 30 Nov 2023 21:04:00 +0000 (21:04 +0000)
* Docs: Improve docs for gc.collect method

* Update gc.rst

Doc/library/gc.rst

index 331c071cda769248f5a7b9a34db082c22592ba81..82277aa52aee0118a7bf82f538b0500c86a23b6a 100644 (file)
@@ -42,8 +42,8 @@ The :mod:`gc` module provides the following functions:
 
    With no arguments, run a full collection.  The optional argument *generation*
    may be an integer specifying which generation to collect (from 0 to 2).  A
-   :exc:`ValueError` is raised if the generation number  is invalid. The number of
-   unreachable objects found is returned.
+   :exc:`ValueError` is raised if the generation number  is invalid. The sum of
+   collected objects and uncollectable objects is returned.
 
    The free lists maintained for a number of built-in types are cleared
    whenever a full collection or collection of the highest generation (2)