[pypy-commit] pypy kill-someobject: make this code more beautiful

alex_gaynor noreply at buildbot.pypy.org
Fri Oct 12 13:48:06 CEST 2012


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: kill-someobject
Changeset: r58025:056e20ad5589
Date: 2012-10-12 04:47 -0700
http://bitbucket.org/pypy/pypy/changeset/056e20ad5589/

Log:	make this code more beautiful

diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -876,8 +876,7 @@
                 if isinstance(spec, tuple) and spec[0] is W_Root:
                     assert False, "use WrappedDefault"
                 if isinstance(spec, WrappedDefault):
-                    w_default = eval('space.wrap(%r)' % (spec.default_value,),
-                                     {'space': space})
+                    w_default = space.wrap(spec.default_value)
                     assert isinstance(w_default, W_Root)
                     assert argname.startswith('w_')
                     argname = argname[2:]


More information about the pypy-commit mailing list