[pypy-svn] r9052 - pypy/dist/pypy/objspace/std
pedronis at codespeak.net
pedronis at codespeak.net
Thu Feb 10 17:10:37 CET 2005
Author: pedronis
Date: Thu Feb 10 17:10:37 2005
New Revision: 9052
Modified:
pypy/dist/pypy/objspace/std/objspace.py
Log:
glue to load old-style classes impl from classobjinterp
(for now disabled)
when enabled (cwd = lib-python-2.3.4/test) :
>>> __metaclass__ = _classobj
>>> execfile("test_class.py")
runs slowly but fine up to a bug in divmod builtin.
Modified: pypy/dist/pypy/objspace/std/objspace.py
==============================================================================
--- pypy/dist/pypy/objspace/std/objspace.py (original)
+++ pypy/dist/pypy/objspace/std/objspace.py Thu Feb 10 17:10:37 2005
@@ -80,12 +80,24 @@
# exceptions
mod = self.setup_exceptions(for_builtins)
+ # old-style classes
+ #self.setup_old_style_classes()
+
# install things in the __builtin__ module
self.make_builtins(for_builtins)
w_exceptions = self.wrap(mod)
self.sys.setbuiltinmodule(w_exceptions, 'exceptions')
+ def setup_old_style_classes(self):
+ """NOT_RPYTHON"""
+ from pypy.module import classobjinterp
+ w_setup = classobjinterp.initclassobj(self)
+ w_classobj, w_instance, w_purify = self.unpackiterable(w_setup)
+ self.call_function(w_purify)
+ self.w_classobj = w_classobj
+ self.w_instance = w_instance
+
def setup_exceptions(self, for_builtins):
"""NOT_RPYTHON"""
## hacking things in
More information about the Pypy-commit
mailing list