Dataclasses - make use of Annotated

I can understand why people aren’t a massive fan of the current syntax, but as I and Eric Traut said in the other thread, this wouldn’t simplify things for type checkers. Unless and until the current way of doing things is removed – which would be hugely disruptive at this point – type checkers would simply have to add even more special-casing so that they could account for both ways of doing things. This would also be the first time we would be asking type checkers to look at the metadata provided with an Annotated type, an additional complication: currently we promise that type checkers can always treat Annotated[T, <metadata>] identically to how they treat T.

5 Likes