mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
[3.11] gh-98154: Clarify Usage of "Reference Count" In the Docs (gh-107753)
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.
This commit is contained in:
parent
22b39d13ec
commit
951320e4d0
14 changed files with 123 additions and 83 deletions
|
@ -99,7 +99,8 @@ For convenience, some of these functions will always return a
|
|||
|
||||
This is the most common way to set the error indicator. The first argument
|
||||
specifies the exception type; it is normally one of the standard exceptions,
|
||||
e.g. :c:data:`PyExc_RuntimeError`. You need not increment its reference count.
|
||||
e.g. :c:data:`PyExc_RuntimeError`. You need not create a new
|
||||
:term:`strong reference` to it (e.g. with :c:func:`Py_INCREF`).
|
||||
The second argument is an error message; it is decoded from ``'utf-8'``.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue