[pypy-svn] rev 445 - pypy/trunk/src/pypy/interpreter

arigo at codespeak.net arigo at codespeak.net
Mon May 26 15:39:29 CEST 2003


Author: arigo
Date: Mon May 26 15:39:29 2003
New Revision: 445

Modified:
   pypy/trunk/src/pypy/interpreter/extmodule.py
Log:
no default arguments yet

Modified: pypy/trunk/src/pypy/interpreter/extmodule.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/extmodule.py	(original)
+++ pypy/trunk/src/pypy/interpreter/extmodule.py	Mon May 26 15:39:29 2003
@@ -29,6 +29,7 @@
 
     def eval_code(self, space, w_globals, w_locals):
         # this isn't quite complete: varargs and kwargs are missing
+        # defaults are not here either
         args = []
         for argname in self.co_varnames:
             w_arg = space.getitem(w_locals, space.wrap(argname))
@@ -48,7 +49,7 @@
         w_module = space.newmodule(space.wrap(modulename))
         for key, value in self.__class__.__dict__.items():
             if isinstance(value, appmethod):
-
-                PyBuiltinCode(self, value)
-                
-                ...
+                code = PyBuiltinCode(self, value)
+                w_function = space.newfunction(code, space.w_None, None)
+                space.setattr(w_module, space.wrap(key), w_function)
+        return w_module


More information about the Pypy-commit mailing list