mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED.
The macro was introduced in #12724.
This commit is contained in:
parent
7d2f9e1342
commit
dfc80e3d97
24 changed files with 87 additions and 162 deletions
|
@ -2608,10 +2608,8 @@ dictview_richcompare(PyObject *self, PyObject *other, int op)
|
|||
assert(PyDictViewSet_Check(self));
|
||||
assert(other != NULL);
|
||||
|
||||
if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other)) {
|
||||
Py_INCREF(Py_NotImplemented);
|
||||
return Py_NotImplemented;
|
||||
}
|
||||
if (!PyAnySet_Check(other) && !PyDictViewSet_Check(other))
|
||||
Py_RETURN_NOTIMPLEMENTED;
|
||||
|
||||
len_self = PyObject_Size(self);
|
||||
if (len_self < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue