[pypy-svn] rev 505 - pypy/trunk/src/pypy/interpreter
mwh at codespeak.net
mwh at codespeak.net
Tue May 27 11:50:23 CEST 2003
Author: mwh
Date: Tue May 27 11:50:23 2003
New Revision: 505
Modified:
pypy/trunk/src/pypy/interpreter/baseobjspace.py
Log:
support keyword args in call_function
Modified: pypy/trunk/src/pypy/interpreter/baseobjspace.py
==============================================================================
--- pypy/trunk/src/pypy/interpreter/baseobjspace.py (original)
+++ pypy/trunk/src/pypy/interpreter/baseobjspace.py Tue May 27 11:50:23 2003
@@ -151,10 +151,11 @@
return w_rv
return self.w_False
- def call_function(self, w_func, *args_w):
- return self.call(w_func,
- self.newtuple(list(args_w)),
- self.newdict([]))
+ def call_function(self, w_func, *args_w, **kw_w):
+ w_kw = self.newdict([])
+ for k, w_v in kw_w.iteritems():
+ self.setitem(w_kw, self.wrap(k), w_v)
+ return self.call(w_func, self.newtuple(list(args_w)), w_kw)
## Table describing the regular part of the interface of object spaces,
## namely all methods which only take w_ arguments and return a w_ result
More information about the Pypy-commit
mailing list