From: Benjamin Peterson Date: Sat, 25 Sep 2010 03:14:33 +0000 (+0000) Subject: don't count keyword arguments as positional #9943 X-Git-Tag: v3.2a3~144 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=81437c90253c5862791781613305d920e8e9c53b;p=python don't count keyword arguments as positional #9943 --- diff --git a/Misc/NEWS b/Misc/NEWS index 489d6a9673..8d7f3287e2 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.2 Alpha 3? Core and Builtins ----------------- +- Issue #9943: Improve the TypeError raised for passing too many positional + arguments. + - Issue #9930: Remove bogus subtype check that was causing (e.g.) float.__rdiv__(2.0, 3) to return NotImplemented instead of the expected 1.5. diff --git a/Python/ceval.c b/Python/ceval.c index 48b5678652..84781be32f 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3104,7 +3104,7 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals, defcount ? "at most" : "exactly", co->co_argcount, co->co_argcount == 1 ? "" : "s", - argcount + kwcount); + argcount); goto fail; } n = co->co_argcount;