summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-05-06 09:01:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-05-06 09:01:41 (GMT)
commit8657845e02b1cd4e2e87ae85f538c66160ec187f (patch)
tree38beed483e9bbca878fb62798807c3fa03f2b3ce /Objects
parent411e5a2c294ea6cd065f37b634b66bdc101098b7 (diff)
downloadcpython-8657845e02b1cd4e2e87ae85f538c66160ec187f.zip
cpython-8657845e02b1cd4e2e87ae85f538c66160ec187f.tar.gz
cpython-8657845e02b1cd4e2e87ae85f538c66160ec187f.tar.bz2
SF bug #692959: new.function ignores keyword arguments
Diffstat (limited to 'Objects')
-rw-r--r--Objects/funcobject.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/funcobject.c b/Objects/funcobject.c
index af34392..8f2d8df 100644
--- a/Objects/funcobject.c
+++ b/Objects/funcobject.c
@@ -316,8 +316,11 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
PyObject *closure = Py_None;
PyFunctionObject *newfunc;
int nfree, nclosure;
+ static char *kwlist[] = {"code", "globals", "name",
+ "argdefs", "closure", 0};
- if (!PyArg_ParseTuple(args, "O!O!|OOO:function",
+ if (!PyArg_ParseTupleAndKeywords(args, kw, "O!O!|OOO:function",
+ kwlist,
&PyCode_Type, &code,
&PyDict_Type, &globals,
&name, &defaults, &closure))