Hacker News new | ask | show | jobs
by xg15 325 days ago
To be honest, that proposal sounds like it would make the problem even worse, by blurring the line between dicts and dataclasses even more.
1 comments

How does creating anonymous TypedDicts (and allowing them to be nested on the fly) blur the line "even more" when those features are not supported by dataclasses?

I mean I agree w.r.t. the blurriness in general but this PEP is not going to change anything about that, in neither direction.

True, but I think what I don't like is that this PEP essentially creates an entire new way of "type definitions" that is separate from the type definitions we already have.

I get the rationale for "anonymous strict" return types, but then I think a better way would be to think up some way to accomplish that for dataclasses.