[pypy-svn] r36590 - in pypy/dist/pypy/annotation: . test

fijal at codespeak.net fijal at codespeak.net
Fri Jan 12 17:29:17 CET 2007


Author: fijal
Date: Fri Jan 12 17:29:15 2007
New Revision: 36590

Modified:
   pypy/dist/pypy/annotation/binaryop.py
   pypy/dist/pypy/annotation/test/test_annrpython.py
Log:
(arigo, fijal) Wack a bit union of PBC and GenericCallback


Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py	(original)
+++ pypy/dist/pypy/annotation/binaryop.py	Fri Jan 12 17:29:15 2007
@@ -685,9 +685,9 @@
 
 class __extend__(pairtype(SomeGenericCallable, SomePBC)):
     def union((gencall, pbc)):
-        unique_key = "unionof(SomeGenericCallable, SomePBC)"
-        if len(pbc.descriptions):
-            bk = pbc.descriptions.iterkeys().next().bookkeeper
+        for desc in pbc.descriptions:
+            unique_key = desc
+            bk = desc.bookkeeper
             s_result = bk.emulate_pbc_call(unique_key, pbc, gencall.args_s)
             s_result = unionof(s_result, gencall.s_result)
             assert gencall.s_result.contains(s_result)

Modified: pypy/dist/pypy/annotation/test/test_annrpython.py
==============================================================================
--- pypy/dist/pypy/annotation/test/test_annrpython.py	(original)
+++ pypy/dist/pypy/annotation/test/test_annrpython.py	Fri Jan 12 17:29:15 2007
@@ -2465,6 +2465,7 @@
                     a = h
                 else:
                     a = c
+                x = x + .01
             return a(x)
 
         #def fun(x):   



More information about the Pypy-commit mailing list