diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-21 19:35:39 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-21 19:35:39 (GMT) |
commit | d51b259b31a4ca2fa81bf9d0644d365be8387a6a (patch) | |
tree | 3aea338a61650ce35d305b3992b247e08ccdc596 /Python | |
parent | 448da71807603770a8033e51b65f6f212fb3e2e4 (diff) | |
download | cpython-d51b259b31a4ca2fa81bf9d0644d365be8387a6a.zip cpython-d51b259b31a4ca2fa81bf9d0644d365be8387a6a.tar.gz cpython-d51b259b31a4ca2fa81bf9d0644d365be8387a6a.tar.bz2 |
remove pointless condition
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index c0c0068..b1d7346 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3115,23 +3115,21 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals, else if (cmp < 0) goto fail; } - if (j >= co->co_argcount) { - if (kwdict == NULL) { - PyObject *kwd_str = kwd_as_string(keyword); - if (kwd_str) { - PyErr_Format(PyExc_TypeError, - "%.200s() got an unexpected " - "keyword argument '%.400s'", - PyString_AsString(co->co_name), - PyString_AsString(kwd_str)); - Py_DECREF(kwd_str); - } - goto fail; + if (kwdict == NULL) { + PyObject *kwd_str = kwd_as_string(keyword); + if (kwd_str) { + PyErr_Format(PyExc_TypeError, + "%.200s() got an unexpected " + "keyword argument '%.400s'", + PyString_AsString(co->co_name), + PyString_AsString(kwd_str)); + Py_DECREF(kwd_str); } - PyDict_SetItem(kwdict, keyword, value); - continue; + goto fail; } -kw_found: + PyDict_SetItem(kwdict, keyword, value); + continue; + kw_found: if (GETLOCAL(j) != NULL) { PyObject *kwd_str = kwd_as_string(keyword); if (kwd_str) { |