[pypy-svn] r11886 - pypy/dist/pypy/interpreter
arigo at codespeak.net
arigo at codespeak.net
Tue May 3 21:04:21 CEST 2005
Author: arigo
Date: Tue May 3 21:04:20 2005
New Revision: 11886
Modified:
pypy/dist/pypy/interpreter/lazymodule.py
Log:
Fix. Obscure.
Modified: pypy/dist/pypy/interpreter/lazymodule.py
==============================================================================
--- pypy/dist/pypy/interpreter/lazymodule.py (original)
+++ pypy/dist/pypy/interpreter/lazymodule.py Tue May 3 21:04:20 2005
@@ -14,7 +14,7 @@
""" NOT_RPYTHON """
Module.__init__(self, space, w_name)
self.lazy = True
- self.__class__.buildloaders()
+ self.__class__.buildloaders()
def get(self, name):
space = self.space
@@ -46,8 +46,12 @@
# obscure
func = space.interpclass_w(w_value)
if type(func) is Function:
- func = BuiltinFunction(func)
- w_value = space.wrap(func)
+ try:
+ bltin = func._builtinversion_
+ except AttributeError:
+ bltin = BuiltinFunction(func)
+ func._builtinversion_ = bltin
+ w_value = space.wrap(bltin)
space.setitem(self.w_dict, space.wrap(name), w_value)
return w_value
More information about the Pypy-commit
mailing list