This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author daniel.urban
Recipients Trundle, benjamin.peterson, daniel.urban, gsakkis
Date 2011-02-27.10:09:12
SpamBayes Score 6.481476e-09
Marked as misclassified No
Message-id <1298801353.49.0.385511671279.issue11256@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2011-02-27 10:09:13daniel.urbansetrecipients: + daniel.urban, gsakkis, benjamin.peterson, Trundle
2011-02-27 10:09:13daniel.urbansetmessageid: <1298801353.49.0.385511671279.issue11256@psf.upfronthosting.co.za>
2011-02-27 10:09:12daniel.urbanlinkissue11256 messages
2011-02-27 10:09:12daniel.urbancreate