mirror of
https://github.com/python/cpython.git
synced 2025-07-15 23:35:23 +00:00
fix #1409: cell variables were not initialized,
when the value comes from a keyword-only parameter.
This commit is contained in:
parent
2af1d894e3
commit
e670bd4f63
2 changed files with 12 additions and 1 deletions
|
@ -2708,7 +2708,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
|
|||
Py_UNICODE *cellname, *argname;
|
||||
PyObject *c;
|
||||
|
||||
nargs = co->co_argcount;
|
||||
nargs = co->co_argcount + co->co_kwonlyargcount;
|
||||
if (co->co_flags & CO_VARARGS)
|
||||
nargs++;
|
||||
if (co->co_flags & CO_VARKEYWORDS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue