21 Feb
2021
21 Feb
'21
8:04 a.m.
Required[T] can evaluate to a box of type Required with parameter T, which the TypedDict __new__ can inspect. It can be implemented in a straightforward fashion.
Again, I think you forget PEP 563; with it, `Required[T]` **will not evaluate** at all. By the way, `ClassVar` and `InitVar` are already boxes like you describe, but `dataclasses` module still has to use regex parsing in case of annotation being stringified.