8000 gh-128509: Add `sys._is_immortal` for identifying immortal objects by ZeroIntensity · Pull Request #128510 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-128509: 8000 Add sys._is_immortal for identifying immortal objects #128510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Jan 31, 2025
Merged
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
Next Next commit
Align to 80 characters.
  • Loading branch information
ZeroIntensity committed Jan 27, 2025
commit 51daa104aea03d76a109d27c380b33955b3089d2
9 changes: 5 additions & 4 deletions Doc/library/sys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -857,8 +857,8 @@ always available. Unless explicitly noted otherwise, all variables are read-only

.. impl-detail::

:term:`Immortal <immortal>` objects with a large reference count can be identified
via :func:`_is_immortal`.
:term:`Immortal <immortal>` objects with a large reference count can be
identified via :func:`_is_immortal`.

.. versionchanged:: 3.12
Immortal objects have very large refcounts that do not match
Expand Down Expand Up @@ -1276,8 +1276,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only

.. note::

Objects that are immortal (and thus return ``True`` upon being passed to this function)
are not guaranteed to be immortal in future versions, and vice versa for mortal objects.
Objects that are immortal (and thus return ``True`` upon being passed
to this function) are not guaranteed to be immortal in future versions,
and vice versa for mortal objects.

.. versionadded:: next

Expand Down
0