Author Trundle
Recipients Trundle, amaury.forgeotdarc
Date 2010-08-26.11:49:35
SpamBayes Score 5.43654e-09
Marked as misclassified No
Message-id <1282823377.28.0.936058946313.issue9683@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2010-08-26 11:49:37Trundlesetrecipients: + Trundle, amaury.forgeotdarc
2010-08-26 11:49:37Trundlesetmessageid: <1282823377.28.0.936058946313.issue9683@psf.upfronthosting.co.za>
2010-08-26 11:49:35Trundlelinkissue9683 messages
2010-08-26 11:49:35Trundlecreate