@@ -6,7 +6,7 @@ Boolean Objects
66---------------
77
88Booleans in Python are implemented as a subclass of integers. There are only
9- two booleans, :const: `Py_False ` and :const : `Py_True `. As such, the normal
9+ two booleans, :c:data: `Py_False ` and :c:data : `Py_True `. As such, the normal
1010creation and deletion functions don't apply to booleans. The following macros
1111are available, however.
1212
@@ -19,29 +19,32 @@ are available, however.
1919
2020.. c :var :: PyObject* Py_False
2121
22- The Python ``False `` object. This object has no methods. It needs to be
23- treated just like any other object with respect to reference counts.
22+ The Python ``False `` object. This object has no methods and is
23+ `immortal <https://peps.python.org/pep-0683/ >`_.
24+
25+ .. versionchanged :: 3.12
26+ :c:data: `Py_False ` is immortal.
2427
2528
2629.. c :var :: PyObject* Py_True
2730
28- The Python ``True `` object. This object has no methods. It needs to be treated
29- just like any other object with respect to reference counts.
31+ The Python ``True `` object. This object has no methods and is
32+ `immortal <https://peps.python.org/pep-0683/ >`_.
33+
34+ .. versionchanged :: 3.12
35+ :c:data: `Py_True ` is immortal.
3036
3137
3238.. c :macro :: Py_RETURN_FALSE
3339
34- Return :const: `Py_False ` from a function, properly incrementing its reference
35- count.
40+ Return :c:data: `Py_False ` from a function.
3641
3742
3843.. c :macro :: Py_RETURN_TRUE
3944
40- Return :const: `Py_True ` from a function, properly incrementing its reference
41- count.
45+ Return :c:data: `Py_True ` from a function.
4246
4347
4448.. c :function :: PyObject* PyBool_FromLong (long v)
4549
46- Return a new reference to :const :`Py_True` or :const :`Py_False` depending on the
47- truth value of *v*.
50+ Return :c:data:`Py_True` or :c:data:`Py_False`, depending on the truth value of *v*.
0 commit comments