_PyEval_EvalCodeWithName(): remove redundant check

Replace the runtime check with an assertion (just in case).
This commit is contained in:
Victor Stinner 2017-01-11 02:12:06 +01:00
parent b915bc354e
commit 231d1f3439

View File

@ -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);