[pypy-svn] r76116 - pypy/branch/fast-forward/pypy/annotation

benjamin at codespeak.net benjamin at codespeak.net
Mon Jul 12 00:18:52 CEST 2010


Author: benjamin
Date: Mon Jul 12 00:18:51 2010
New Revision: 76116

Modified:
   pypy/branch/fast-forward/pypy/annotation/model.py
Log:
be more specific

Modified: pypy/branch/fast-forward/pypy/annotation/model.py
==============================================================================
--- pypy/branch/fast-forward/pypy/annotation/model.py	(original)
+++ pypy/branch/fast-forward/pypy/annotation/model.py	Mon Jul 12 00:18:51 2010
@@ -164,7 +164,8 @@
 
     def __eq__(self, other):
         # NaN unpleasantness.
-        if (self.is_constant() and other.is_constant() and
+        if (type(self) is SomeFloat and type(other) is SomeFloat and
+            self.is_constant() and other.is_constant() and
             isnan(self.const) and isnan(other.const)):
             return True
         return super(SomeFloat, self).__eq__(other)



More information about the Pypy-commit mailing list