take into account keyword arguments when passing too many args

This commit is contained in:
Benjamin Peterson 2010-03-21 20:30:30 +00:00
parent 965458931f
commit bb9d726357
2 changed files with 10 additions and 1 deletions

View file

@ -3060,7 +3060,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals,
defcount ? "at most" : "exactly",
co->co_argcount,
co->co_argcount == 1 ? "" : "s",
argcount);
argcount + kwcount);
goto fail;
}
n = co->co_argcount;