Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 62492:69fdf68e0b5b
only take into account positional arguments count in related error messages
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Fri, 25 Jun 2010 19:30:21 +0000 |
| parents | c8d5d1205fe8 |
| children | 983e2c0bf8dc |
line wrap: on
line diff
--- a/Python/ceval.c Fri Jun 25 10:56:11 2010 +0000 +++ b/Python/ceval.c Fri Jun 25 19:30:21 2010 +0000 @@ -3100,11 +3100,11 @@ if (!(co->co_flags & CO_VARARGS)) { PyErr_Format(PyExc_TypeError, "%U() takes %s %d " - "argument%s (%d given)", + "positional argument%s (%d given)", co->co_name, defcount ? "at most" : "exactly", - total_args, - total_args == 1 ? "" : "s", + co->co_argcount, + co->co_argcount == 1 ? "" : "s", argcount + kwcount); goto fail; }
