mirror of
https://github.com/python/cpython
synced 2024-09-05 08:17:45 +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)
|
||||
/*[clinic end generated code: output=bcd47a402e482e1d input=5fa9b97df03c427f]*/
|
||||
{
|
||||
PyObject *result;
|
||||
result = (a == b) ? Py_True : Py_False;
|
||||
Py_INCREF(result);
|
||||
return result;
|
||||
PyObject *result = Py_Is(a, b) ? Py_True : Py_False;
|
||||
return Py_NewRef(result);
|
||||
}
|
||||
|
||||
/*[clinic input]
|
||||
|
|
Loading…
Reference in a new issue