Message212509
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' |
|
Date |
User |
Action |
Args |
2014-03-01 16:00:50 | jlowin | set | recipients:
+ jlowin |
2014-03-01 16:00:50 | jlowin | set | messageid: <1393689650.85.0.777698851793.issue20816@psf.upfronthosting.co.za> |
2014-03-01 16:00:50 | jlowin | link | issue20816 messages |
2014-03-01 16:00:50 | jlowin | create | |
|