From 231d1f3439f3a9c629eb3117ee72a653da0f6238 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 11 Jan 2017 02:12:06 +0100 Subject: [PATCH] _PyEval_EvalCodeWithName(): remove redundant check Replace the runtime check with an assertion (just in case). --- Python/ceval.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/ceval.c b/Python/ceval.c index f86f6aafdc..b970ece4e9 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); -- 2.40.0