mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
bpo-43753: _operator.is_() uses Py_Is() (GH-28641)
This commit is contained in:
parent
d441437ee7
commit
8d3e7eff09
1 changed files with 2 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue