[issue43753] [C API] Add Py_Is(x, y) and Py_IsNone(x) functions
STINNER Victor
report at bugs.python.org
Fri Apr 9 09:59:56 EDT 2021
STINNER Victor <vstinner at python.org> added the comment:
> I tried applying this API on an extension, and I found the code to be slightly less readable for the "is not" cases.
FYI you can try upgrade_pythoncapi.py on your project using the following PR to update code to use Py_IsNone/Py_IsTrue/Py_IsFalse:
https://github.com/pythoncapi/pythoncapi_compat/pull/8
For example, use "upgrade_pythoncapi.py -o Py_Is directory/" or "upgrade_pythoncapi.py -o Py_Is file.c".
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43753>
_______________________________________
More information about the Python-bugs-list
mailing list