[issue9326] Error message for incorrect number of (function) args is incorrect

Dave Fugate report at bugs.python.org
Wed Jul 21 22:46:11 CEST 2010


Dave Fugate <dfugate at microsoft.com> added the comment:

Actually CPython 2.6 emits precisely what I'd expect:
D:\rft\vsl\dlr\Languages\IronPython\Tests>26
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f(a, b=2): pass
...
>>> f(b=2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: f() takes at least 1 non-keyword argument (0 given)

----------

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


More information about the Python-bugs-list mailing list