diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-01-11 01:12:06 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-01-11 01:12:06 (GMT) |
commit | 231d1f3439f3a9c629eb3117ee72a653da0f6238 (patch) | |
tree | 01693fcd4ddd05e9319c60e2f69f5c0f93b198d4 /Python/ceval.c | |
parent | b915bc354e57889a93943159a6a238e0c9c20daa (diff) | |
download | cpython-231d1f3439f3a9c629eb3117ee72a653da0f6238.zip cpython-231d1f3439f3a9c629eb3117ee72a653da0f6238.tar.gz cpython-231d1f3439f3a9c629eb3117ee72a653da0f6238.tar.bz2 |
_PyEval_EvalCodeWithName(): remove redundant check
Replace the runtime check with an assertion (just in case).
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index f86f6aa..b970ece 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -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); |