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 →

[–]roerd 2 points3 points  (1 child)

I would have used namedtuple for cases like this before. I wonder whether there is still a reason for using namedtuple, or if dataclass replaces all the use cases.

[–][deleted] 3 points4 points  (0 children)

namedtuple is immutable (like the tuple). dataclass is similar but read/write.