[issue20189] inspect.Signature doesn't recognize all builtin types

Larry Hastings report at bugs.python.org
Tue Jan 14 00:47:32 CET 2014


Larry Hastings added the comment:

Here's an updated patch.  I tried to "do it right" which wound up being a huge amount of work in Clinic.  The actual change to inspect.Signature was really easy, once I understood everything.

The churn in the .c files is because Clinic now uses the self converter's type for the parsing function, and (obviously) because it's now generating "self" in the signatures as appropriate.

Fun trivia: the "self" parameter to a builtin is always a positional-only parameter, even if all other argument processing for the function is PyArg_ParseTupleAndKeywords.  I think this patch marks the first time inspect.Signature will ever mark a parameter as positional-only!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20189>
_______________________________________


More information about the Python-bugs-list mailing list