[pypy-svn] r60870 - pypy/trunk/pypy/objspace
pedronis at codespeak.net
pedronis at codespeak.net
Sat Jan 10 14:41:23 CET 2009
Author: pedronis
Date: Sat Jan 10 14:41:23 2009
New Revision: 60870
Modified:
pypy/trunk/pypy/objspace/descroperation.py
Log:
these don't use the binop rule as such in CPython, though the right and left variants are the same so this should anyway not be too wrong and there's little point on applying the more complicated logic that the binop rule demands because of issue412
Modified: pypy/trunk/pypy/objspace/descroperation.py
==============================================================================
--- pypy/trunk/pypy/objspace/descroperation.py (original)
+++ pypy/trunk/pypy/objspace/descroperation.py Sat Jan 10 14:41:23 2009
@@ -365,7 +365,7 @@
w_right_impl = None
else:
w_right_src, w_right_impl = space.lookup_in_type_where(w_typ2, '__coerce__')
- if (w_left_src is not w_right_src # XXX see binop_impl
+ if (w_left_src is not w_right_src
and space.is_true(space.issubtype(w_typ2, w_typ1))):
w_obj1, w_obj2 = w_obj2, w_obj1
w_left_impl, w_right_impl = w_right_impl, w_left_impl
@@ -423,7 +423,7 @@
w_right_impl = None
else:
w_right_src, w_right_impl = space.lookup_in_type_where(w_typ2, '__cmp__')
- if (w_left_src is not w_right_src # XXX see binop_impl
+ if (w_left_src is not w_right_src
and space.is_true(space.issubtype(w_typ2, w_typ1))):
w_obj1, w_obj2 = w_obj2, w_obj1
w_left_impl, w_right_impl = w_right_impl, w_left_impl
More information about the Pypy-commit
mailing list