On 2020-07-21 01:25, Thiago Carvalho D'Ávila 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?
-1
It's clearer if you say upfront that you're defining a function, which
is that 'def' does.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/HGJ6VR5SZYE56ZZ7OJNP6QVJUFBVJYBC/
Code of Conduct: http://python.org/psf/codeofconduct/