Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from typing import Generic, TypeVar, Tuple
- class X: pass
- class Y(X): pass
- class Z: pass
- T = TypeVar('T', bound=X)
- class A(Generic[T]):
- def f(self, x: T) -> None: pass
- class B(A[Y]):
- def f(self, x: Y) -> None: pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement