[pypy-svn] r9491 - pypy/dist/pypy/annotation

pedronis at codespeak.net pedronis at codespeak.net
Thu Feb 24 22:23:38 CET 2005


Author: pedronis
Date: Thu Feb 24 22:23:37 2005
New Revision: 9491

Modified:
   pypy/dist/pypy/annotation/binaryop.py
Log:
improve just a bit issubtype



Modified: pypy/dist/pypy/annotation/binaryop.py
==============================================================================
--- pypy/dist/pypy/annotation/binaryop.py	(original)
+++ pypy/dist/pypy/annotation/binaryop.py	Thu Feb 24 22:23:37 2005
@@ -93,7 +93,7 @@
         r = SomeBool()
         if obj2.is_constant():
             if obj1.is_constant(): 
-                r.const = obj1.const is obj2.const 
+                r.const = obj1.const is obj2.const
         # XXX HACK HACK HACK
         # XXX HACK HACK HACK
         # XXX HACK HACK HACK
@@ -319,6 +319,8 @@
 class __extend__(pairtype(SomeObject, SomePBC)):
     def issubtype((obj, pbc)):
         s = SomeBool()
+        if obj.is_constant() and pbc.is_constant():
+            s.const = issubclass(obj.const, pbc.const)
         if hasattr(obj,'is_type_of') and pbc.is_constant():
             bk = getbookkeeper()
             s.knowntypedata = (obj.is_type_of, bk.valueoftype(pbc.const))



More information about the Pypy-commit mailing list