summaryrefslogtreecommitdiffstats
path: root/Python/ceval.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-11 01:12:06 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-11 01:12:06 (GMT)
commit231d1f3439f3a9c629eb3117ee72a653da0f6238 (patch)
tree01693fcd4ddd05e9319c60e2f69f5c0f93b198d4 /Python/ceval.c
parentb915bc354e57889a93943159a6a238e0c9c20daa (diff)
downloadcpython-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.c3
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);