Created
January 24, 2026 09:14
-
-
Save mypy-play/11cabf4942f89eb67b0bc2483e4fb78c to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains hidden or 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 Callable | |
| class C[T]: ... | |
| def f[U]() -> type[C[U]]: | |
| return C | |
| c: Callable[[], C[int]] = f() | |
| reveal_type(f) | |
| reveal_type(c) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment