diff options
author | Victor Stinner <vstinner@python.org> | 2021-04-10 22:17:39 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-10 22:17:39 (GMT) |
commit | 09bbebea163fe7303264cf4069c51d4d2f22fde4 (patch) | |
tree | af9449e38983bab8ebf5a667c149cb0d33e05543 /Doc/whatsnew | |
parent | 6e468cb16bde483ad73c1eb13b20a08d74e30846 (diff) | |
download | cpython-09bbebea163fe7303264cf4069c51d4d2f22fde4.zip cpython-09bbebea163fe7303264cf4069c51d4d2f22fde4.tar.gz cpython-09bbebea163fe7303264cf4069c51d4d2f22fde4.tar.bz2 |
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.
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.10.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 7cf5576..18d83b6 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -1385,6 +1385,13 @@ New Features build (``Py_TRACE_REFS`` macro). (Contributed by Victor Stinner in :issue:`43688`.) +* 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. + (Contributed by Victor Stinner in :issue:`43753`.) + Porting to Python 3.10 ---------------------- |