4 ms·
> The sentiment in Python has been trending toward using "classes" (either with dataclass or attrs [1]) as essentially namespaced logicless containers, and away
by dragonwriter 6y ago
> The sentiment in Python has been trending toward using "classes" (either with dataclass or attrs [1]) as essentially namespaced logicless containers, and away from dicts (or TypedDicts [2]) and namedtuples/NamedTuples [3]) for that purpose.
But...TypedDicts and NamedTuples are classes (that is, the thing returned from those callable is a class and can be subclassed or have methods added just like any other class), so it's kind of odd to say you are using classes instead of...classes.