mirror of
https://github.com/python/cpython
synced 2024-09-15 23:57:10 +00:00
bpo-43753: _operator.is_() uses Py_Is() (GH-28641)
This commit is contained in:
parent
d441437ee7
commit
8d3e7eff09
|
@ -704,10 +704,8 @@ static PyObject *
|
||||||
_operator_is__impl(PyObject *module, PyObject *a, PyObject *b)
|
_operator_is__impl(PyObject *module, PyObject *a, PyObject *b)
|
||||||
/*[clinic end generated code: output=bcd47a402e482e1d input=5fa9b97df03c427f]*/
|
/*[clinic end generated code: output=bcd47a402e482e1d input=5fa9b97df03c427f]*/
|
||||||
{
|
{
|
||||||
PyObject *result;
|
PyObject *result = Py_Is(a, b) ? Py_True : Py_False;
|
||||||
result = (a == b) ? Py_True : Py_False;
|
return Py_NewRef(result);
|
||||||
Py_INCREF(result);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
|
|
Loading…
Reference in a new issue