remove pointless condition

This commit is contained in:
Benjamin Peterson 2010-03-21 19:35:39 +00:00
parent 448da71807
commit d51b259b31
1 changed files with 13 additions and 15 deletions

View File

@ -3115,23 +3115,21 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
else if (cmp < 0) else if (cmp < 0)
goto fail; goto fail;
} }
if (j >= co->co_argcount) { if (kwdict == NULL) {
if (kwdict == NULL) { PyObject *kwd_str = kwd_as_string(keyword);
PyObject *kwd_str = kwd_as_string(keyword); if (kwd_str) {
if (kwd_str) { PyErr_Format(PyExc_TypeError,
PyErr_Format(PyExc_TypeError, "%.200s() got an unexpected "
"%.200s() got an unexpected " "keyword argument '%.400s'",
"keyword argument '%.400s'", PyString_AsString(co->co_name),
PyString_AsString(co->co_name), PyString_AsString(kwd_str));
PyString_AsString(kwd_str)); Py_DECREF(kwd_str);
Py_DECREF(kwd_str);
}
goto fail;
} }
PyDict_SetItem(kwdict, keyword, value); goto fail;
continue;
} }
kw_found: PyDict_SetItem(kwdict, keyword, value);
continue;
kw_found:
if (GETLOCAL(j) != NULL) { if (GETLOCAL(j) != NULL) {
PyObject *kwd_str = kwd_as_string(keyword); PyObject *kwd_str = kwd_as_string(keyword);
if (kwd_str) { if (kwd_str) {