Ivan Levkivskyi firstname.lastname@example.org added the comment:
There is a third party library on PyPI called typing_inspect that provides thin wrappers around internal APIs to get lots of useful information about generics and other special types in typing.
If there will be more requests like this, then the most used functions from there might be moved to typing itself. Or is it already enough? (Especially in view of recent typing refactoring that simplified the internal APIs.)
---------- nosy: +gvanrossum, levkivskyi