]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 7 Aug 2023 21:40:59 +0000 (15:40 -0600)
committerGitHub <noreply@github.com>
Mon, 7 Aug 2023 21:40:59 +0000 (15:40 -0600)
commit5dc825d504ad08d64c9d1ce578f9deebbe012604
tree8a557a9d3149a33262cd4a18186fe77a993a915d
parent0191af97a6bf3f720cd0ae69a0bdb14c97351679
gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107552)

PEP 683 (immortal objects) revealed some ways in which the Python documentation has been unnecessarily coupled to the implementation details of reference counts.  In the end users should focus on reference ownership, including taking references and releasing them, rather than on how many reference counts an object has.

This change updates the documentation to reflect that perspective.  It also updates the docs relative to immortal objects in a handful of places.
15 files changed:
Doc/c-api/allocation.rst
Doc/c-api/arg.rst
Doc/c-api/buffer.rst
Doc/c-api/bytes.rst
Doc/c-api/exceptions.rst
Doc/c-api/init_config.rst
Doc/c-api/intro.rst
Doc/c-api/module.rst
Doc/c-api/object.rst
Doc/c-api/refcounting.rst
Doc/c-api/sys.rst
Doc/c-api/typeobj.rst
Doc/c-api/unicode.rst
Doc/glossary.rst
Doc/library/sys.rst