mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +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;
|
||||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue