summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2010-09-23 20:11:19 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2010-09-23 20:11:19 (GMT)
commitb09a3d69a614c767653a12428d1ac816f516f36e (patch)
tree9a1c0f9ee8a6ebf0ba0ee357914b8ecde36fa3d7 /Objects
parente8e4b3bfd65582564b5933dcb4d0cdb3157884dc (diff)
downloadcpython-b09a3d69a614c767653a12428d1ac816f516f36e.zip
cpython-b09a3d69a614c767653a12428d1ac816f516f36e.tar.gz
cpython-b09a3d69a614c767653a12428d1ac816f516f36e.tar.bz2
Issue #9930: Remove an unnecessary type check in wrap_binaryfunc_r;
this was causing reversed method calls like float.__radd__(3.0, 1) to return NotImplemented instead of the expected numeric value.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 897374d..7bdcb12 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4063,10 +4063,6 @@ wrap_binaryfunc_r(PyObject *self, PyObject *args, void *wrapped)
if (!check_num_args(args, 1))
return NULL;
other = PyTuple_GET_ITEM(args, 0);
- if (!PyType_IsSubtype(Py_TYPE(other), Py_TYPE(self))) {
- Py_INCREF(Py_NotImplemented);
- return Py_NotImplemented;
- }
return (*func)(other, self);
}