Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from abc import abstractproperty
- from typing import Generic, TypeVar
- T_co = TypeVar('T_co', covariant=True)
- T = TypeVar('T')
- class Dataset(Generic[T_co]):
- def __getitem__(self, index) -> T_co:
- raise NotImplementedError
- class Base(Dataset):
- @abstractproperty
- def num_joints(self):
- return None
- class Derived(Base):
- def t(self):
- pass
- d = Derived()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement