On Wed, Jan 29, 2020 at 1:25 PM Saul Shanabrook via Typing-sig <typing-sig@python.org> wrote:
> The PEP says that list == list[str]. This currently returns false in my
branch (apparently this doesn't use __getattribute__ to get the __eq__
operation), and I think I like that better. It also matches the behavior of
typing.List.

I aggree, I also like this better. In a lot of my code I find I need to compare the equality of different parametrized types and it would be too bad to have to hand code this logic.

Well, the idea would be that list[int] == list[int] would also return False. There currently isn't a cache and I don't think it's worth implementing one -- the entire thing is currently a single memory allocation plus some increfs, which is probably cheaper than the Python implementation in typing.py with cache.
 
--
--Guido van Rossum (python.org/~guido)