[issue9943] TypeError message became less helpful in Python 2.7
Benjamin Peterson
report at bugs.python.org
Sat Sep 25 05:26:27 CEST 2010
Benjamin Peterson <benjamin at python.org> added the comment:
Reverted, however. Let me clarify: you think the unhelpful part is that the count includes keyword arguments? This change was intentional, actually wrt to cases like this:
>>> def f(a):
... pass
>>> f(6, a=4, *(1, 2, 3))
Traceback (most recent call last):
...
TypeError: f() takes exactly 1 positional argument (5 given)
>>> def f(a, *, kw):
... pass
>>> f(6, 4, kw=4)
Traceback (most recent call last):
...
TypeError: f() takes exactly 1 positional argument (3 given)
----------
resolution: fixed ->
status: closed -> open
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9943>
_______________________________________
More information about the Python-bugs-list
mailing list