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 jlowin
Recipients jlowin
Date 2014-03-01.16:00:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1393689650.85.0.777698851793.issue20816@psf.upfronthosting.co.za>
In-reply-to
Content
Tested in Python 3.3 and Python 3.4.0rc1 5e05d7d3db9c

If a function has keyword-only arguments but no keyword-only defaults, then calling inspect.getcallargs with no arguments results in the wrong TypeError being raised.

Example:

>>> import inspect
>>> def fn(*, a): 
>>>    pass
>>> inspect.getcallargs(fn)

Result: 
    TypeError: argument of type 'NoneType' is not iterable

Expected Result: 
    TypeError: fn() missing 1 required keyword-only argument: 'a'
History
Date User Action Args
2014-03-01 16:00:50jlowinsetrecipients: + jlowin
2014-03-01 16:00:50jlowinsetmessageid: <1393689650.85.0.777698851793.issue20816@psf.upfronthosting.co.za>
2014-03-01 16:00:50jlowinlinkissue20816 messages
2014-03-01 16:00:50jlowincreate