Daniel Urban <[email protected]> added the comment:
I found another case, when this is a problem: if there are no **kwargs, but
there are some keyword-only arguments:
>>> def f(*, a, b): pass
...
>>> f(a=1, b=2)
>>>
>>> getcallargs(f, a=1, b=2)
Traceback (most recent call last):
...
TypeError: f() takes no arguments (2 given)
The attached issue11256_3.diff patch also fixes this problem, and adds tests
that would have detected this case.
----------
Added file: http://bugs.python.org/file20930/issue11256_3.diff
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11256>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com