Commit 231d1f34 authored by Victor Stinner's avatar Victor Stinner

_PyEval_EvalCodeWithName(): remove redundant check

Replace the runtime check with an assertion (just in case).
parent b915bc35
......@@ -4017,7 +4017,8 @@ _PyEval_EvalCodeWithName(PyObject *_co, PyObject *globals, PyObject *locals,
}
}
if (j >= total_args && kwdict == NULL) {
assert(j >= total_args);
if (kwdict == NULL) {
PyErr_Format(PyExc_TypeError,
"%U() got an unexpected keyword argument '%S'",
co->co_name, keyword);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment