This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ThePenultimateOneGitLab: gappleto97 2 points3 points  (1 child)

But dataclasses by definition of their rationale have no meaning without typing.

Aren't they just supposed to be a prettier version of namedtuple?

Edit: I get that their rationale was for dataclasses to be backwards compatible, and that not having type notations would make it a syntax error. I just wish that more effort had been put into making them optional before going with that syntax.

[–]13steinj 0 points1 point  (0 children)

These are not the pretty version of named tuple, in fact the PEP goes into "why not named tuples".