[pypy-svn] r64664 - pypy/trunk/pypy/rlib

benjamin at codespeak.net benjamin at codespeak.net
Sat Apr 25 03:47:52 CEST 2009


Author: benjamin
Date: Sat Apr 25 03:47:50 2009
New Revision: 64664

Modified:
   pypy/trunk/pypy/rlib/objectmodel.py
Log:
use the newer types module

Modified: pypy/trunk/pypy/rlib/objectmodel.py
==============================================================================
--- pypy/trunk/pypy/rlib/objectmodel.py	(original)
+++ pypy/trunk/pypy/rlib/objectmodel.py	Sat Apr 25 03:47:50 2009
@@ -3,7 +3,8 @@
 RPython-compliant way.
 """
 
-import sys, new
+import sys
+import types
 
 # specialize is a decorator factory for attaching _annspecialcase_
 # attributes to functions: for example
@@ -102,7 +103,7 @@
     if isinstance(cls, type):
         return cls.__new__(cls)
     else:
-        return new.instance(cls)
+        return types.InstanceType(cls)
 
 def we_are_translated():
     return False



More information about the Pypy-commit mailing list