Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
GH-157724: Fix external gc.rst outdated gc.is_tracked({}) value for G…
…H-127010

  it appears that since at least GH-127010 in 3.14 `gc.is_tracked({})` has returned `true`, but as of https://github.com/python/cpython/blob/9232c21a1c1eb6a12b96acebbef6c86a698228e0/Doc/library/gc.rst?plain=1#L205 the external GC documentation was not updated for this while the internal documentation, e.g. https://github.com/python/cpython/blob/9232c21a1c1eb6a12b96acebbef6c86a698228e0/InternalDocs/garbage_collector.md?plain=1#L726 was, so I update the external to be consistent here.
  • Loading branch information
willy-b committed Sep 23, 2026
commit 7f9b890b42b6f899a97c374eea47fda1a8875dba
5 changes: 2 additions & 3 deletions Doc/library/gc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,7 @@ The :mod:`!gc` module provides the following functions:
``False`` otherwise. As a general rule, instances of atomic types aren't
tracked and instances of non-atomic types (containers, user-defined
objects...) are. However, some type-specific optimizations can be present
in order to suppress the garbage collector footprint of simple instances
(e.g. dicts containing only atomic keys and values)::
in order to suppress the garbage collector footprint of simple instances::

>>> gc.is_tracked(0)
False
Expand All @@ -203,7 +202,7 @@ The :mod:`!gc` module provides the following functions:
>>> gc.is_tracked([])
True
>>> gc.is_tracked({})
False
True
>>> gc.is_tracked({"a": 1})
True

Expand Down
Loading