21 Jul
2020
21 Jul
'20
9:30 a.m.
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)
Into this:
x(method: fun[int, dict] -> None) -> None: ... pass ... type(x)
What do you think?
-1 It's clearer if you say upfront that you're defining a function, which is that 'def' does.