[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions

STINNER Victor report at bugs.python.org
Thu Apr 8 07:37:11 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

Mark:
> `is` is not well defined except for a small set of values, so the docs for `Py_Is` would have to so vague as to be worthless, IMO.

I don't propose to change the "is" operator semantic: Py_Is(x, y) is C would behave *exaclty* as "x is y" in Python.

Check my implementation: the IS_OP bytecode uses directly Py_Is().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43753>
_______________________________________


More information about the Python-bugs-list mailing list