[Python-ideas] Keyword only argument on function call

Jeroen Demeyer J.Demeyer at UGent.be
Tue Sep 11 08:38:29 EDT 2018

On 2018-09-11 14:20, Steven D'Aprano wrote:
> On Tue, Sep 11, 2018 at 08:53:55PM +1000, Steven D'Aprano wrote:
> [...]
>> Or perhaps we could have an officially blessed way to give tools a hint
>> as to what the real signature is.
>> class Child(Parent):
>>      @signature_hint(Parent.method)
>>      def method(self, **kwargs):
>>          pass

I was planning to submit a PEP to support a __signature__ attribute 
(without the _hint) in inspect.signature(), see PEP 576 and PEP 579 for 
some context. The reason is very different from what is suggested here: 
to allow implementing custom function-like classes that inspect should 
treat as functions.

More information about the Python-ideas mailing list