Skip to content

Instantly share code, notes, and snippets.

from dataclasses import dataclass
from typing import List
T_co = TypeVar('T_co', Employee, Engineer, Manager, covariant=True)
T_contra = TypeVar('T_contra', Employee, Engineer, Manager, contravariant=True)
@dataclass
class Employee:
salary: int