Created
November 14, 2025 10:02
-
-
Save mypy-play/a2d228294e0a7a613472376043c62642 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 NotRequired, TypedDict | |
| class Foo(TypedDict): | |
| key1: NotRequired[str] | |
| key2: NotRequired[int] | |
| foo = Foo() | |
| for key in "key1", "key2": | |
| reveal_type(key) | |
| del foo[key] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment