diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_collectionsmodule.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index d0a381d..fd0e4ed 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -2133,12 +2133,8 @@ defdict_repr(defdictobject *dd) static PyObject* defdict_or(PyObject* left, PyObject* right) { - int left_is_self = PyObject_IsInstance(left, (PyObject*)&defdict_type); - if (left_is_self < 0) { - return NULL; - } PyObject *self, *other; - if (left_is_self) { + if (PyObject_TypeCheck(left, &defdict_type)) { self = left; other = right; } |