[pypy-svn] r32650 - pypy/dist/pypy/objspace/cclp

auc at codespeak.net auc at codespeak.net
Tue Sep 26 15:02:19 CEST 2006


Author: auc
Date: Tue Sep 26 15:02:17 2006
New Revision: 32650

Modified:
   pypy/dist/pypy/objspace/cclp/variable.py
Log:
more explicit error reports


Modified: pypy/dist/pypy/objspace/cclp/variable.py
==============================================================================
--- pypy/dist/pypy/objspace/cclp/variable.py	(original)
+++ pypy/dist/pypy/objspace/cclp/variable.py	Tue Sep 26 15:02:17 2006
@@ -339,9 +339,9 @@
         w_d1 = w_x.getdict() #returns wrapped dict or unwrapped None ...
         w_d2 = w_y.getdict()
         if None in [w_d1, w_d2]:
-            raise_unification_failure(space)
+            raise_unification_failure(space, str(w_x) + " != " + str(w_y))
         else:
-            return space.unify(w_d1, w_d2)
+            return unify__Dict_Dict(space, w_d1, w_d2)
     return space.w_None
     
 def unify__Var_Var(space, w_x, w_y):
@@ -366,7 +366,7 @@
 
 def unify__Tuple_Tuple(space, w_i1, w_i2):
     if len(w_i1.wrappeditems) != len(w_i2.wrappeditems):
-        raise_unification_failure(space)
+        raise_unification_failure(space, "tuples of different lengths.")
     idx, top = (-1, space.int_w(space.len(w_i1))-1)
     while idx < top:
         idx += 1
@@ -379,7 +379,7 @@
 
 def unify__List_List(space, w_i1, w_i2):
     if len(w_i1.wrappeditems) != len(w_i2.wrappeditems):
-        raise_unification_failure(space)
+        raise_unification_failure(space, "lists of different lengths.")
     idx, top = (-1, space.int_w(space.len(w_i1))-1)
     while idx < top:
         idx += 1



More information about the Pypy-commit mailing list