[Python-ideas] Re: PEP Idea: Better return type annotation syntax

2022-01-16 Thread Tushar Sadhwani
Jelle Zijlstra wrote: > > I like this too. A practical issue is that list[(a, b)] and list[a, b] look > the same to the compiler, but they would mean very different things. It's > not obvious how to fix this in a backward-compatible way. > > I think it looks much cleaner, and if there isn't any

[Python-ideas] Re: PEP Idea: Better return type annotation syntax

2022-01-06 Thread Jelle Zijlstra
On Thu, Jan 6, 2022 at 10:44 PM Tushar Sadhwani < tushar.sadhwani...@gmail.com> wrote: > With the recent submission of [PEP 677][1], I was reminded of an idea I > had with function annotation syntax since the very beginning: > > why not let me write: > > ```python > def f() -> tuple[int, str]: >