On Thu, Apr 25, 2019 at 1:51 PM Ivan Levkivskyi <levkivs...@gmail.com>
wrote:

> TBH, I don't think it is so bad that it requires a new syntax. But I am
> not strongly against it either. What I would like to add here is that if we
> will go with the replacement:
>
> Callable[[X, Y], Z] becomes (X, Y) -> Z
>
> then we should also go with
>
> Union[X, Y] becomes X | Y
> Tuple[X, Y] becomes (X, Y)
>

This may not be workable, because A[X, Y] and A[(X, Y)] have identical
semantics in Python. So Tuple[(X, Y)] could either mean Tuple[X, Y] or
Tuple[Tuple[X, Y]].
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to