<p dir="ltr"><br>
On 21 Jan 2014 06:26, "Terry Reedy" <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:<br>
><br>
> On 1/20/2014 7:59 AM, Nick Coghlan wrote:<br>
><br>
>> However, while I know you're keen to finally make introspection work<br>
>> for all C level callables in 3.4, even the ones with signatures that<br>
>> can't be expressed as Python function signatures, I'd like to strongly<br>
>> encourage you to hold off on that last part until Python 3.5.<br>
><br>
> ...<br>
><br>
>> That way, you can resurrect PEP 457, recast it as proposing an<br>
>> *output* format for inspect.Signature.__repr__(), add an<br>
>> inspect.Signature.fromstr() API that can use it to create a signature<br>
>> object from __text_signature__ attributes (rather than relying on<br>
>> ast.parse), add the optional group support and do it *right*, rather<br>
>> than trying to squeeze it in as a new public API during the beta<br>
>> period, which may lock us in to supporting an introspection API we<br>
>> later regret.<br>
><br>
><br>
> I agree. What we can do with the API we have already is a great advance.</p>
<p dir="ltr">It also occurred to me last night that PEP 457 could define a "functools.textsignature" decorator to permit describing a particular signature on arbitrary callables (using the attribute already added for Argument Clinic, but extended to arbitrary types). That would allow signature overrides without needing to import the inspect module at startup.</p>

<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">><br>
> -- <br>
> Terry Jan Reedy<br>
><br>
><br>
> _______________________________________________<br>
> Python-Dev mailing list<br>
> <a href="mailto:Python-Dev@python.org">Python-Dev@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-dev">https://mail.python.org/mailman/listinfo/python-dev</a><br>
> Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com">https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com</a><br>
</p>