Generic type inference from another generic type

Thanks @jorenham,
So far it seems your solution does actually work for the need I raised. Never thought about using type hints on self that may open more solutions to this kind of problems in the future.

In my typing quest I have also encountered the same issue as @bryevdv and I ended up accepting that the only solution we currently have is the one provided by @Tinche but that is not fullfilling the goal completly.

As far as I know in Python type hinting the only way there is to properly do type mappings is on functions with the overload decorator. I have read some criticism about the verbosity of it on functions and I doesn’t solve the more general type mapping concept we have here.

Some links related to this idea: