Browse Source
bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)
bpo-43753: Add Py_Is() and Py_IsNone() functions (GH-25227)
Add the Py_Is(x, y) function to test if the 'x' object is the 'y' object, the same as "x is y" in Python. Add also the Py_IsNone(), Py_IsTrue(), Py_IsFalse() functions to test if an object is, respectively, the None singleton, the True singleton or the False singleton.pull/25327/head
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 198 additions and 38 deletions
-
31Doc/c-api/structures.rst
-
4Doc/data/stable_abi.dat
-
7Doc/whatsnew/3.10.rst
-
8Include/boolobject.h
-
9Include/object.h
-
6Misc/NEWS.d/next/C API/2021-04-06-20-52-44.bpo-43753.xUsHp1.rst
-
111Modules/_testcapimodule.c
-
27Objects/object.c
-
33Python/ceval.c
@ -0,0 +1,6 @@ |
|||
Add the :c:func:`Py_Is(x, y) <Py_Is>` function to test if the *x* object is the |
|||
*y* object, the same as ``x is y`` in Python. Add also the :c:func:`Py_IsNone`, |
|||
:c:func:`Py_IsTrue`, :c:func:`Py_IsFalse` functions to test if an object is, |
|||
respectively, the ``None`` singleton, the ``True`` singleton or the ``False`` |
|||
singleton. |
|||
Patch by Victor Stinner. |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue