Author: Manuel Jacob
Branch: remove-remaining-smm
Changeset: r69422:bc9db28fcce0
Date: 2014-02-25 15:06 +0100
http://bitbucket.org/pypy/pypy/changeset/bc9db28fcce0/

Log:    Fix complex <=> float comparison.

diff --git a/pypy/objspace/std/complexobject.py 
b/pypy/objspace/std/complexobject.py
--- a/pypy/objspace/std/complexobject.py
+++ b/pypy/objspace/std/complexobject.py
@@ -410,7 +410,8 @@
             return space.newbool((self.realval == w_other.realval) and
                                  (self.imagval == w_other.imagval))
         if (space.isinstance_w(w_other, space.w_int) or
-            space.isinstance_w(w_other, space.w_long)):
+            space.isinstance_w(w_other, space.w_long) or
+            space.isinstance_w(w_other, space.w_float)):
             if self.imagval:
                 return space.w_False
             return space.eq(space.newfloat(self.realval), w_other)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to