mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (#105195)
This commit is contained in:
parent
4328dc6465
commit
a2392720d6
3 changed files with 25 additions and 19 deletions
|
@ -15,12 +15,12 @@ same reason.
|
|||
|
||||
.. c:var:: PyObject* Py_None
|
||||
|
||||
The Python ``None`` object, denoting lack of value. This object has no methods.
|
||||
It needs to be treated just like any other object with respect to reference
|
||||
counts.
|
||||
The Python ``None`` object, denoting lack of value. This object has no methods
|
||||
and is `immortal <https://peps.python.org/pep-0683/>`_.
|
||||
|
||||
.. versionchanged:: 3.12
|
||||
:c:data:`Py_None` is immortal.
|
||||
|
||||
.. c:macro:: Py_RETURN_NONE
|
||||
|
||||
Properly handle returning :c:data:`Py_None` from within a C function (that is,
|
||||
increment the reference count of ``None`` and return it.)
|
||||
Return :c:data:`Py_None` from a function.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue