logoalt Hacker News

mrweaselyesterday at 12:03 PM1 replyview on HN

What would that do exactly? Auto-generate a TypedDict class?

Bringing up TypedDict is sort of interesting, because it seems like a frozen dictionary could have been implemented by PEP 705, if typing.ReadOnly was enforced at runtime, and not just a hint to a static type checker.


Replies

dmurrayyesterday at 12:15 PM

Auto-generate a TypedDict type while type checking, while doing nothing at runtime.

I expect this is not a very big ask and the various typecheckers will have versions of this soon after release.

show 2 replies