mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Merged revisions 84984 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84984 | mark.dickinson | 2010-09-23 21:11:19 +0100 (Thu, 23 Sep 2010) | 5 lines 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. ........
This commit is contained in:
parent
9227508dec
commit
a67c70d4a9
3 changed files with 9 additions and 4 deletions
|
@ -4049,10 +4049,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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue