4 ms·
Ah, of course. Good point. I tend to write things in an immutable style, so I don't usually pay attention to this.
by weberc2 9y ago
Ah, of course. Good point. I tend to write things in an immutable style, so I don't usually pay attention to this.
- silviogutierrez 9y agoI see immutability as a feature. There are uses cases for mutability, but it should be opt-in, not opt-out. So I'm not loving the fact that "frozen" (the mutability param for data classes) defaults to False.
- weberc2 9y agoI agree, which is part of the reason I think I'd be inclined to derive from NamedTuple and forego data classes.
- icebraining 9y agoPython is very much not immutable by default, it'd be weird to subvert it in a specific case.