Created
September 18, 2021 09:36
-
-
Save mypy-play/5a316fc1e3ca8fb435ca40bbadd3ea66 to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Iterator, Generic, TypeVar | |
T = TypeVar("T") | |
T2 = TypeVar("T2") | |
class A(Iterator[T2], Generic[T, T2]): | |
... | |
a: A[int, list[int]] | |
i = [*a] | |
reveal_type(i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment