[pypy-svn] r17388 - pypy/dist/pypy/translator/goal

pedronis at codespeak.net pedronis at codespeak.net
Thu Sep 8 19:31:06 CEST 2005


Author: pedronis
Date: Thu Sep  8 19:31:04 2005
New Revision: 17388

Modified:
   pypy/dist/pypy/translator/goal/query.py
Log:
this sanity check should consider that the annotator always normalize unbound methods to the underlying function.




Modified: pypy/dist/pypy/translator/goal/query.py
==============================================================================
--- pypy/dist/pypy/translator/goal/query.py	(original)
+++ pypy/dist/pypy/translator/goal/query.py	Thu Sep  8 19:31:04 2005
@@ -475,6 +475,8 @@
             funcs = dict.fromkeys(meth.s_value.prebuiltinstances.iterkeys())
             for subcls in subclasses:
                 f = subcls.cls.__dict__.get(name)
+                if hasattr(f, 'im_self') and f.im_self is None:
+                    f = f.im_func                
                 if f:
                     if f not in funcs:
                         print "Lost method!", name, subcls.cls, cls, subcls.attrs.keys() 



More information about the Pypy-commit mailing list