Message212514
If inspect.getcallargs() is called on a function and three or more arguments are missing, an IndexError is raised instead of the expected TypeError.
This bug is present in Python 3.3 and 3.4.0 rc1 (5e05d7d3db9c). However, it worked as expected in Python 2.7.6.
Example:
>>> import inspect
>>> def fn(a, b, c):
>>> pass
>>> inspect.getcallargs(fn)
Result:
IndexError: tuple index out of range
Expected:
TypeError: fn() missing 3 required positional arguments: 'a', 'b' and 'c' |
|
Date |
User |
Action |
Args |
2014-03-01 16:35:04 | jlowin | set | recipients:
+ jlowin |
2014-03-01 16:35:04 | jlowin | set | messageid: <1393691704.85.0.0636600891648.issue20817@psf.upfronthosting.co.za> |
2014-03-01 16:35:04 | jlowin | link | issue20817 messages |
2014-03-01 16:35:04 | jlowin | create | |
|