]> granicus.if.org Git - python/commitdiff
whatsnew for gc.get_stats, plus doc tweaks.
authorR David Murray <rdmurray@bitdance.com>
Thu, 26 Dec 2013 20:11:28 +0000 (15:11 -0500)
committerR David Murray <rdmurray@bitdance.com>
Thu, 26 Dec 2013 20:11:28 +0000 (15:11 -0500)
Clarified the "At the moment" wording, and added the get_stats entry in the
module summary that Serhiy noted was missing at the end of issue 16351.

Given that pydoc lists all the function docstrings, I'm not sure that module
summary section is actually needed; but, it is probably better to address that
when the module is converted to use Argument Clinic.  In the meantime we
should keep the list complete.

Doc/library/gc.rst
Doc/whatsnew/3.4.rst
Modules/gcmodule.c

index 6b95dc564526673981430517563702d1a857b1dd..813554206a39bc8f84361089950579b9b02162c1 100644 (file)
@@ -69,9 +69,10 @@ The :mod:`gc` module provides the following functions:
 
 .. function:: get_stats()
 
-   Return a list of 3 per-generation dictionaries containing collection
-   statistics since interpreter start.  At this moment, each dictionary will
-   contain the following items:
+   Return a list of three per-generation dictionaries containing collection
+   statistics since interpreter start.  The number of keys may change
+   in the future, but currently each dictionary will contain the following
+   items:
 
    * ``collections`` is the number of times this generation was collected;
 
index e2f810cc7574a41eda9e1deff279c97294abd64d..96f2ba8e72c24e8561f36ac30c1e9d5625832792 100644 (file)
@@ -628,6 +628,14 @@ multiple implementations of an operation that allows it to work with
       PEP written and implemented by Ćukasz Langa.
 
 
+gc
+--
+
+New :func:`~gc.get_stats` returns a list of three per-generation dictionaries
+containing the collections statistics since interpreter startup.  (Contributed
+by Antoine Pitrou in :issue:`16351`.)
+
+
 hashlib
 -------
 
index a84d752ffa6c10720e4a3c764675871db85caaca..d5fd9df5210dbdfc0aa12de283d9ea34a6de2d6c 100644 (file)
@@ -1498,6 +1498,7 @@ PyDoc_STRVAR(gc__doc__,
 "isenabled() -- Returns true if automatic collection is enabled.\n"
 "collect() -- Do a full collection right now.\n"
 "get_count() -- Return the current collection counts.\n"
+"get_stats() -- Return list of dictionaries containing per-generation stats.\n"
 "set_debug() -- Set debugging flags.\n"
 "get_debug() -- Get debugging flags.\n"
 "set_threshold() -- Set the collection thresholds.\n"