Closed alicederyn closed 6 months ago
The Python Typing Council recommends accepting PEP 705, “TypedDict: Read-only items”. The PEP's motivation and rationale are well written and clearly describe how attribute mutability can hurt ergonomics in common use cases. Variants of the idea have been discussed and iterated on over the last year and a half, and reflect learnings from previous community experience with TypedDict features — for instance, the final version incorporates lessons from PEP 655. We expect PEP 705 to compose well with existing TypedDict features. The type qualifier introduced would likely work well if we extended support to Protocols in the future. The PEP has already been implemented in one type checker and we foresee no major issues in getting it implemented in other type checkers.
(I will cross-post this to Discuss, and also post an SC issue for the next step.)
I would like to request a decision on PEP 705 – TypedDict: Read-only items.