summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-11 02:12:06 +0100
committerVictor Stinner <victor.stinner@gmail.com>2017-01-11 02:12:06 +0100
commit36e18bf2fa1a07b5f7b67f55c038cdb90a17dc19 (patch)
tree575985c53ef8ad325c76ead154089d13cad46c04 /Python
parent3106ff9ad570b650a3afee6ebc4adc7430c5eca2 (diff)
downloadcpython-36e18bf2fa1a07b5f7b67f55c038cdb90a17dc19.tar.gz
_PyEval_EvalCodeWithName(): remove redundant check
Replace the runtime check with an assertion (just in case).
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c3
1 files changed, 2 insertions, 1 deletions
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);