typing.TypedDict creates a dict subclass. dict is a generic class, and can be specialized, e.g. dict[int, str]. But TypedDict creates a specialized dictionary class, with different types for values for different keys (and the type of the key is always str). It is not a generic class. It does not make sense to specialize it the same way as TypedDict.
Activity
pythongh-92106: Forbid specialization of TypedDict types
pythongh-92106: Add test that subscription works on arbitrary TypedDicts
gh-92106: Add test that subscription works on arbitrary TypedDicts (#…
JelleZijlstra commented on May 2, 2022
Closing since we merged #92176.
pythongh-92106: Add test that subscription works on arbitrary TypedDi…
pythongh-92106: Add test that subscription works on arbitrary TypedDi…
gh-92106: Add test that subscription works on arbitrary TypedDicts (G…
gh-92106: Add test that subscription works on arbitrary TypedDicts (G…
pythongh-92106: Add test that subscription works on arbitrary TypedDi…