Skip to content

Commit 3c62217

Browse files
authored
Add comment explaining why typing_extensions.TypedDict is kept distinct (#15949)
it would be too easy for an eager contributor to revert 4531374 in the name of simplifying the stub
1 parent 10c1405 commit 3c62217

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

stdlib/typing_extensions.pyi

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ Literal: _SpecialForm
235235

236236
def IntVar(name: str) -> Any: ... # returns a new TypeVar
237237

238+
# Kept as a distinct symbol to `typing.TypedDict` so that type checkers can more easily
239+
# distinguish between the two on Python 3.14, on which `typing_extensions.TypedDict`
240+
# exposes `__closed__` and `__extra_items__` but `typing.TypedDict` does not
238241
TypedDict: _SpecialForm
239242

240243
# Internal mypy fallback type for all typed dicts (does not exist at runtime)

0 commit comments

Comments
 (0)