mirror of
https://github.com/python/cpython.git
synced 2025-10-22 14:42:22 +00:00
_PyEval_EvalCodeWithName(): remove redundant check
Replace the runtime check with an assertion (just in case).
This commit is contained in:
parent
b915bc354e
commit
231d1f3439
1 changed files with 2 additions and 1 deletions
|
@ -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,
|
PyErr_Format(PyExc_TypeError,
|
||||||
"%U() got an unexpected keyword argument '%S'",
|
"%U() got an unexpected keyword argument '%S'",
|
||||||
co->co_name, keyword);
|
co->co_name, keyword);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue