Guido van Rossum <gu...@python.org> added the comment:

Good find! I see that typing.Callable has adopted this structure precisely to 
enable caching.

We should see if we can fix _collections_abc.Callable. It's still early in the 
life of 3.9 so I think this is reasonable.

We'll need a subclass of GenericAlias so that the repr() of Callable[[int, 
int], int] still comes out correctly. This is similar to how typing.Callable 
solves it.

Do you feel up to submitting a PR for this? Otherwise maybe Batuhan feels like 
contributing a fix for this?

----------
nosy: +BTaskaya

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42195>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to