Re: [Python-ideas] Keyword only argument on function call
11 Sep
2018
11 Sep
'18
6:38 a.m.
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.
2053
Age (days ago)
2053
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jeroen Demeyer