[Python-ideas] Re: Callable annotation featureset [Was: Alternative to Callable Annotation]

2020-11-29 Thread Andrew Svetlov
The proposed examples look awesome, thanks! On Sun, Nov 29, 2020 at 7:27 PM Guido van Rossum wrote: > That's a fair criticism -- Protocols are usable for this, but the syntax > is hardly the most intuitive, and most people would never think of this > approach. > > I guess the alternative would b

[Python-ideas] Re: Callable annotation featureset [Was: Alternative to Callable Annotation]

2020-11-29 Thread Guido van Rossum
That's a fair criticism -- Protocols are usable for this, but the syntax is hardly the most intuitive, and most people would never think of this approach. I guess the alternative would be to duplicate the full syntax allowed in the parameter list of a 'def' statement (with some tweaks perhaps), so

[Python-ideas] Re: Callable annotation featureset [Was: Alternative to Callable Annotation]

2020-11-29 Thread Andrew Svetlov
On Sun, Nov 29, 2020 at 1:49 AM Guido van Rossum wrote: > On Sat, Nov 28, 2020 at 9:32 AM Andrew Svetlov > wrote: > >> I would see support of all argument kinds support in any proposal for a >> new callable: positional only args, named args, keyword-only, *args and >> **kwargs. >> The exact nota