News for hackers. Stuff that matters.
Re:The Data Classes Decorator by pletnes on Sunday December 12, 2021 @10:06AM (#29530165)
Dataclasses can optionally be «frozen» / immutable IIRC.

Namedtuple is intended for when you need a tuple. I’ve used it for e.g numpy array shapes, so image data has names (imgshape.width instead of imgshape[1]). There, you need an actual tuple (or subclass of tuple if you want).

There are no comments on this comment yet.