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
In general a new feature like this should probably be discussed in the typing repo first, since it would require changes to the typing.py module (which is gated by stdlib releases).
@gvanrossum Assuming the original syntax is taken from Java, this is what I proposed in the issue you mentioned, T = TypeVar('T', bound=Intersection[t1, t2]). As I mentioned in that issue, the most obvious use case is when types t1, t2 are ABCs (similar to interfaces in Java).
For type variables that extend multiple interfaces
<T extends I1 & I2>
The text was updated successfully, but these errors were encountered: