[Python-ideas] Add PassedArgSpec class to types and expose mapping given an ArgSpec.

Neil Girdhar mistersheik at gmail.com
Wed Sep 18 20:38:59 CEST 2013


As far as I know, the way that arguments are mapped to a parameter 
specification is not exposed to the programmer.  I suggest adding a 
PassedArgSpec class having two members: args and kwargs.  Then, 
inspect.ArgSpec can take an argument specification and decode the 
PassedArgSpect (putting the right things in the right places) and return a 
dictionary with everything in its right place.

I can only think of one use for now, which is replacing "arguments" in the 
returned tuple of __reduce__ and maybe allowing it to be returned by 
"__getnewargs__".  It might also be nice to store such argument 
specifications instead of the pair args, kwargs when storing them in lists.

Best,

Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130918/f4ffa460/attachment.html>


More information about the Python-ideas mailing list