PEP 705 - TypedDict: Read-only and other keys

Thanks for the update @alicederyn!

If any of you would like to experiment with the recent updates to PEP 705, pyright 1.1.333 implements this new functionality as an experimental feature. You need to set enableExperimentalFeatures to “true” in the pyright configuration.

I recently published a new pyright playground web app so you can play with typed code in your browser. This is similar to the popular mypy playground.

Here are some code samples copied directly from the draft PEP 705 so you can play with them in the pyright playground:

2 Likes