mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
SF bug #692959: new.function ignores keyword arguments
This commit is contained in:
parent
411e5a2c29
commit
8657845e02
1 changed files with 4 additions and 1 deletions
|
@ -316,8 +316,11 @@ func_new(PyTypeObject* type, PyObject* args, PyObject* kw)
|
||||||
PyObject *closure = Py_None;
|
PyObject *closure = Py_None;
|
||||||
PyFunctionObject *newfunc;
|
PyFunctionObject *newfunc;
|
||||||
int nfree, nclosure;
|
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,
|
&PyCode_Type, &code,
|
||||||
&PyDict_Type, &globals,
|
&PyDict_Type, &globals,
|
||||||
&name, &defaults, &closure))
|
&name, &defaults, &closure))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue