Message114967
The correct call is more something like ``inspect.formatargspec(*inspect.getargspec(f))``, which should work for all (Python) functions in Python 3. In Python 2, tuple unpacking was represented using a nested list for the arguments:
>>> def f(x, (y, z)): pass
...
>>> inspect.getargspec(f).args
['x', ['y', 'z']]
It is impossible to get such a nested list from `getargspec()` now, but if you provide one, you execute the dead code path:
>>> inspect.formatargspec(['x', ['y', 'z']])
TypeError: object of type 'map' has no len() |
|
Date |
User |
Action |
Args |
2010-08-26 11:49:37 | Trundle | set | recipients:
+ Trundle, amaury.forgeotdarc |
2010-08-26 11:49:37 | Trundle | set | messageid: <1282823377.28.0.936058946313.issue9683@psf.upfronthosting.co.za> |
2010-08-26 11:49:35 | Trundle | link | issue9683 messages |
2010-08-26 11:49:35 | Trundle | create | |
|