On Tue, Jul 21, 2020 at 10:34 AM Thiago Carvalho D'Ávila
<thiagocav...@gmail.com> wrote:
>
> Chris Angelico, you have a good point. An alternative solution that would 
> achieve similar or even better results in terms of simplification would be 
> not creating `fun` as a keyword and allowing developers to create functions 
> in Python without a keyword (like in C-family). That way, a new proposal 
> would be changing:
>
> >>> from typing import Callable
> >>> def x(method: Callable[[int, dict], None]) -> None:
> ... pass
> ...
> >>> type(x)
> <class 'function'>
>
> Into this:
>
> >>> x(method: fun[int, dict] -> None) -> None:
> ... pass
> ...
> >>> type(x)
> <class 'fun'>
>
> What do you think?

Exactly the same thing: that you would do better to create a
transpiler that converts your proposed syntax into legal syntax. That
way, you get to try things out and see how it actually feels, and the
process of creating the transpiler will reveal ambiguities to you :)

(If you want me to be a little more direct about it: I am strongly
against this proposal, as are others.)

ChrisA
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/B5HCHATCSKSGWNSA7DNEEOE5TLR25XQG/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to