[pypy-issue] [issue847] Old style class equality test failure

Amaury Forgeot d Arc tracker at bugs.pypy.org
Fri Aug 26 14:30:39 CEST 2011


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

What about this patch? I found similar code in binop_impl, for example.

--- a/pypy/objspace/descroperation.py	Sun Aug 21 11:31:11 2011 +0200
+++ b/pypy/objspace/descroperation.py	Fri Aug 26 14:29:33 2011 +0200
@@ -731,6 +731,9 @@
             w_right_src, w_right_impl = space.lookup_in_type_where(w_typ2, right)
             # XXX see binop_impl
             if space.is_true(space.issubtype(w_typ2, w_typ1)):
+              if (w_left_src and w_right_src and
+                  not space.abstract_issubclass_w(w_left_src, w_right_src) and
+                  not space.abstract_issubclass_w(w_typ1, w_right_src)):
                 w_obj1, w_obj2 = w_obj2, w_obj1
                 w_left_impl, w_right_impl = w_right_impl, w_left_impl

----------
nosy: +afa
status: wontfix -> chatting

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue847>
________________________________________


More information about the pypy-issue mailing list