| 1 |
TypeVar = 0 |
| 2 |
Generic = 0 |
| 3 |
Any = object() |
| 4 |
overload = 0 |
| 5 |
Type = 0 |
| 6 |
Literal = 0 |
| 7 |
Optional = 0 |
| 8 |
Self = 0 |
| 9 |
Tuple = 0 |
| 10 |
ClassVar = 0 |
| 11 |
Final = 0 |
| 12 |
|
| 13 |
T = TypeVar('T') |
| 14 |
T_co = TypeVar('T_co', covariant=True) |
| 15 |
KT = TypeVar('KT') |
| 16 |
|
| 17 |
class Iterable(Generic[T_co]): pass |
| 18 |
class Iterator(Iterable[T_co]): pass |
| 19 |
class Sequence(Iterable[T_co]): pass |
| 20 |
class Mapping(Iterable[KT], Generic[KT, T_co]): |
| 21 |
def keys(self) -> Iterable[KT]: pass # Approximate return type |
| 22 |
def __getitem__(self, key: KT) -> T_co: pass |
| 23 |
|
| 24 |
class NamedTuple(tuple[Any, ...]): |
| 25 |
_fields: ClassVar[tuple[str, ...]] |
| 26 |
@overload |
| 27 |
def __init__(self, typename: str, fields: Iterable[tuple[str, Any]] = ...) -> None: ... |
| 28 |
@overload |
| 29 |
def __init__(self, typename: str, fields: None = None, **kwargs: Any) -> None: ... |
| 30 |
|
| 31 |
class _SpecialForm: pass |