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

STINNER Victor report at bugs.python.org
Sat Apr 10 18:19:22 EDT 2021


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

Carl:
> Just chiming in to say that for PyPy this API would be extremely useful, because PyPy's "is" is not implementable with a pointer comparison on the C level (due to unboxing we need to compare integers, floats, etc by value). Right now, C extension code that compares pointers is subtly broken and cannot be fixed by us.

Can you come with a sentence that I can put in the documentation to explain that Py_Is() is written for interoperability with other Python implementations?

----------

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


More information about the Python-bugs-list mailing list