[pypy-commit] pypy remove-remaining-smm: Fix complex <=> float comparison.
Manuel Jacob
noreply at buildbot.pypy.org
Tue Feb 25 15:28:20 CET 2014
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)
More information about the pypy-commit
mailing list