[pypy-svn] r32638 - pypy/dist/pypy/objspace/cclp/constraint

auc at codespeak.net auc at codespeak.net
Mon Sep 25 18:46:00 CEST 2006


Author: auc
Date: Mon Sep 25 18:45:59 2006
New Revision: 32638

Modified:
   pypy/dist/pypy/objspace/cclp/constraint/domain.py
Log:
transl. fix


Modified: pypy/dist/pypy/objspace/cclp/constraint/domain.py
==============================================================================
--- pypy/dist/pypy/objspace/cclp/constraint/domain.py	(original)
+++ pypy/dist/pypy/objspace/cclp/constraint/domain.py	Mon Sep 25 18:45:59 2006
@@ -109,7 +109,9 @@
         return self._space.newbool(self._space.eq_w(self._values, w_other._values))
             
     def __ne__(self, w_other):
-        return not self == w_other
+        if not isinstance(w_other, W_FiniteDomain):
+            return self._space.newbool(True)
+        return self._space.newbool(self._space.ne_w(self._values, w_other._values))
 
 
 
@@ -117,7 +119,7 @@
 # function bolted into the space to serve as constructor
 def make_fd(space, w_values):
     assert isinstance(w_values, W_ListObject)
-    return space.wrap(W_FiniteDomain(space, w_values))
+    return W_FiniteDomain(space, w_values)
 app_make_fd = gateway.interp2app(make_fd)
 
 



More information about the Pypy-commit mailing list