|
|
|
|
|
by hprotagonist
2951 days ago
|
|
I am happy that lightweight data classes are now in the stdlib -- hopefully this puts an expiration date on overuse of namedtuple, which has turned out to be kind of a bad idea. Being able to make sane lightweight classes in one-off one-file python scripts will be nice. That said, on any package that I write that has third party dependencies anyway (read: all of them), I don't see a compelling reason to change from attrs. |
|
Ultimately, I threw out dataclasses too. But if I didn't need __repr__, __post_init__ and __slots__ with default values, I'd probably have just stuck with dataclasses :)