[pypy-svn] r44724 - pypy/dist/pypy/lang/scheme

jlg at codespeak.net jlg at codespeak.net
Wed Jul 4 15:22:15 CEST 2007


Author: jlg
Date: Wed Jul  4 15:22:15 2007
New Revision: 44724

Modified:
   pypy/dist/pypy/lang/scheme/object.py
Log:
agrument W_Identfier -> str in W_Lambda init

Modified: pypy/dist/pypy/lang/scheme/object.py
==============================================================================
--- pypy/dist/pypy/lang/scheme/object.py	(original)
+++ pypy/dist/pypy/lang/scheme/object.py	Wed Jul  4 15:22:15 2007
@@ -164,8 +164,9 @@
         self.args = []
         arg = args
         while not isinstance(arg, W_Nil):
-            #list of argumen names, not evaluated
-            self.args.append(arg.car)
+            assert isinstance(arg.car, W_Identifier)
+            #list of argument names, not evaluated
+            self.args.append(arg.car.to_string())
             arg = arg.cdr
 
         self.body = body
@@ -181,9 +182,8 @@
 
         local_ctx = ctx.copy()
         vars = zip(self.args, lst)
-        for name_val in vars:
-            assert isinstance(name_val[0], W_Identifier)
-            local_ctx.put(name_val[0].to_string(), name_val[1])
+        for (name, val) in vars:
+            local_ctx.put(name, val)
 
         return self.body.eval(local_ctx)
 



More information about the Pypy-commit mailing list