[pypy-svn] r25480 - pypy/dist/pypy/objspace/constraint

afayolle at codespeak.net afayolle at codespeak.net
Fri Apr 7 11:04:59 CEST 2006


Author: afayolle
Date: Fri Apr  7 11:04:58 2006
New Revision: 25480

Modified:
   pypy/dist/pypy/objspace/constraint/constraint.py
Log:
started working on the port

Modified: pypy/dist/pypy/objspace/constraint/constraint.py
==============================================================================
--- pypy/dist/pypy/objspace/constraint/constraint.py	(original)
+++ pypy/dist/pypy/objspace/constraint/constraint.py	Fri Apr  7 11:04:58 2006
@@ -44,8 +44,9 @@
     def __eq__(self, other): #FIXME and parent
         if not isinstance(other, self.__class__): return False
         return self._variables == other._variables
+    
 
-class BasicConstraint(object):
+class W_BasicConstraint(object):
     """A BasicConstraint, which is never queued by the Repository
     A BasicConstraint affects only one variable, and will be entailed
     on the first call to narrow()"""
@@ -356,32 +357,32 @@
             return Expression(vars, formula)
 
 
-class Equals(BasicConstraint):
+class W_Equals(W_BasicConstraint):
     """A basic constraint variable == constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.eq)
+        W_BasicConstraint.__init__(self, variable, reference, operator.eq)
 
-class NotEquals(BasicConstraint):
+class W_NotEquals(W_BasicConstraint):
     """A basic constraint variable != constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.ne)
+        W_BasicConstraint.__init__(self, variable, reference, operator.ne)
 
-class LesserThan(BasicConstraint):
+class W_LesserThan(W_BasicConstraint):
     """A basic constraint variable < constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.lt)
+        W_BasicConstraint.__init__(self, variable, reference, operator.lt)
 
-class LesserOrEqual(BasicConstraint):
+class W_LesserOrEqual(W_BasicConstraint):
     """A basic constraint variable <= constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.le)
+        W_BasicConstraint.__init__(self, variable, reference, operator.le)
 
-class GreaterThan(BasicConstraint):
+class W_GreaterThan(W_BasicConstraint):
     """A basic constraint variable > constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.gt)
+        W_BasicConstraint.__init__(self, variable, reference, operator.gt)
 
-class GreaterOrEqual(BasicConstraint):
+class W_GreaterOrEqual(W_BasicConstraint):
     """A basic constraint variable >= constant value"""
     def __init__(self, variable, reference):
-        BasicConstraint.__init__(self, variable, reference, operator.ge)
+        W_BasicConstraint.__init__(self, variable, reference, operator.ge)



More information about the Pypy-commit mailing list