From: Victor Stinner Date: Wed, 11 Jan 2017 01:12:06 +0000 (+0100) Subject: _PyEval_EvalCodeWithName(): remove redundant check X-Git-Tag: v3.7.0a1~1584 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=231d1f3439f3a9c629eb3117ee72a653da0f6238;p=python _PyEval_EvalCodeWithName(): remove redundant check Replace the runtime check with an assertion (just in case). --- 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);