mirror of
https://github.com/python/cpython.git
synced 2024-11-29 12:54:02 +08: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
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user