[issue2516] Instance methods are misreporting the number of arguments

Alexander Belopolsky report at bugs.python.org
Fri Jun 25 20:34:50 CEST 2010


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

Here is a similar issue which may be easier to fix:


>>> def f(a, b=None, *, c=None, d=None):
...    pass


>>> f(1,2,3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() takes at most 4 arguments (3 given)


Should be "f() takes at most 2 positional arguments (3 given)"

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2516>
_______________________________________


More information about the Python-bugs-list mailing list