(no title)
justanotherbody | 1 year ago
For my use the key is how easily you can add simple conversion of values to attrs. IIRC this was intentionally omitted from dataclasses. For a 1-off using a factory with a dataclass is easy but repeated uses send me back to attrs
eesmith|1 year ago
Most people don't need, say, a[-3] as an alias for a.field_name.
Otherwise, for those who want the standard library, use a dataclass with frozen=True for immutability.