[pypy-svn] r10864 - pypy/dist/pypy/objspace/std

pedronis at codespeak.net pedronis at codespeak.net
Tue Apr 19 18:10:06 CEST 2005


Author: pedronis
Date: Tue Apr 19 18:10:06 2005
New Revision: 10864

Modified:
   pypy/dist/pypy/objspace/std/objspace.py
Log:
reordering to cut the number of warnings when annotating



Modified: pypy/dist/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/std/objspace.py	(original)
+++ pypy/dist/pypy/objspace/std/objspace.py	Tue Apr 19 18:10:06 2005
@@ -189,6 +189,10 @@
         if isinstance(x, list):
             wrappeditems = [self.wrap(item) for item in x]
             return W_ListObject(self, wrappeditems)
+        if isinstance(x, BaseWrappable):
+            w_result = x.__spacebind__(self)
+            #print 'wrapping', x, '->', w_result
+            return w_result
         if isinstance(x, long):
             from pypy.objspace.std.longobject import args_from_long
             return W_LongObject(self, *args_from_long(x))
@@ -199,10 +203,6 @@
             return self.call_function(c,
                                       self.wrap(x.real), 
                                       self.wrap(x.imag))
-        if isinstance(x, BaseWrappable):
-            w_result = x.__spacebind__(self)
-            #print 'wrapping', x, '->', w_result
-            return w_result
         # anything below this line is implicitly XXX'ed
         if isinstance(x, type(Exception)) and issubclass(x, Exception):
             w_result = self.wrap_exception_cls(x)



More information about the Pypy-commit mailing list