[pypy-svn] r33357 - in pypy/dist/pypy: interpreter objspace/std

arigo at codespeak.net arigo at codespeak.net
Tue Oct 17 09:17:29 CEST 2006


Author: arigo
Date: Tue Oct 17 09:17:27 2006
New Revision: 33357

Modified:
   pypy/dist/pypy/interpreter/gateway.py
   pypy/dist/pypy/objspace/std/dictmultiobject.py
Log:
Python 2.3 compatibility.


Modified: pypy/dist/pypy/interpreter/gateway.py
==============================================================================
--- pypy/dist/pypy/interpreter/gateway.py	(original)
+++ pypy/dist/pypy/interpreter/gateway.py	Tue Oct 17 09:17:27 2006
@@ -230,12 +230,12 @@
             cache[key] = activation_cls, self.run_args
             return activation_cls
 
-    @staticmethod
     def make_activation(unwrap_spec, func):
         emit = UnwrapSpec_EmitRun()
         emit.apply_over(unwrap_spec)
         activation_uw_cls = emit._make_unwrap_activation_class(unwrap_spec)
         return activation_uw_cls(func)
+    make_activation = staticmethod(make_activation)
 
 
 class BuiltinActivation(object):
@@ -302,7 +302,6 @@
         self.unwrap.append("space.%s_w(%s)" % (typ.__name__,
                                                self.nextarg()))
 
-    @staticmethod
     def make_fastfunc(unwrap_spec, func):
         unwrap_info = UnwrapSpec_FastFunc_Unwrap()
         unwrap_info.apply_over(unwrap_spec)
@@ -330,6 +329,7 @@
             exec compile2(source) in unwrap_info.miniglobals, d
             fastfunc = d['fastfunc_%s_%d' % (func.__name__, narg)]
         return narg, fastfunc
+    make_fastfunc = staticmethod(make_fastfunc)
         
 class BuiltinCode(eval.Code):
     "The code object implementing a built-in (interpreter-level) hook."

Modified: pypy/dist/pypy/objspace/std/dictmultiobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/dictmultiobject.py	(original)
+++ pypy/dist/pypy/objspace/std/dictmultiobject.py	Tue Oct 17 09:17:27 2006
@@ -1,3 +1,4 @@
+import py
 from pypy.objspace.std.objspace import *
 from pypy.interpreter import gateway
 
@@ -564,7 +565,7 @@
 del DictInfo._dict_infos[-1]
 tmpl = 'os.write(fd, "%(attr)s" + ": " + str(info.%(attr)s) + "\\n")'
 bodySrc = []
-for attr in sorted(_example.__dict__):
+for attr in py.builtin.sorted(_example.__dict__):
     if attr == 'sig':
         continue
     bodySrc.append(tmpl%locals())



More information about the Pypy-commit mailing list