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

tismer at codespeak.net tismer at codespeak.net
Tue Apr 18 06:02:35 CEST 2006


Author: tismer
Date: Tue Apr 18 06:02:24 2006
New Revision: 25922

Modified:
   pypy/dist/pypy/annotation/model.py
Log:
being more consistent about == and "is"

Modified: pypy/dist/pypy/annotation/model.py
==============================================================================
--- pypy/dist/pypy/annotation/model.py	(original)
+++ pypy/dist/pypy/annotation/model.py	Tue Apr 18 06:02:24 2006
@@ -546,7 +546,7 @@
     raise ValueError("%sshould return a low-level type,\ngot instead %r" % (
         info, s_val))
 
-ll_to_annotation_map = dict([(ll, ann) for ann,ll in annotation_to_ll_map])
+ll_to_annotation_map = dict([(ll, ann) for ann, ll in annotation_to_ll_map])
 
 def lltype_to_annotation(T):
     try:
@@ -657,7 +657,7 @@
         else:
             flattened = args
         for arg in flattened:
-            if arg.__class__ == SomeObject and arg.knowntype != type:
+            if arg.__class__ is SomeObject and arg.knowntype is not type:
                 return  SomeObject()
         bookkeeper = pypy.annotation.bookkeeper.getbookkeeper()
         bookkeeper.warning("no precise annotation supplied for %s%r" % (name, args))



More information about the Pypy-commit mailing list