You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Iterable[T][int] == Iterable[int] returns False. It could be convenient to implement an __eq__ that returns True for generics that are considered the same from the point of view of static type checkers.
Of course, there is a very simple way to do this: just compare the new repr for two classes :-)
But probably the right way would be to factor out the algorithm from the new repr that "substitutes" type variables and use it for both repr and __eq__.
Activity
Refactor Union, Tuple, and Callable (#308)