3 ms·
Someone should tell this person about dataclasses
by willseth 5y ago
Someone should tell this person about dataclasses
- deleted 5y ago[deleted]
- nhumrich 5y agoI mean, the blog post is older than dataclasses
- willseth 5y agoGreat, maybe OP shouldn’t post and people shouldn’t upvote outdated blog posts with bad advice
- geofft 5y agodataclasses was explicitly inspired by attrs. https://github.com/ericvsmith/dataclasses/issues/1 https://github.com/ericvsmith/dataclasses/issues/1
- willseth 5y agoThank you for reinforcing my point
- shakna 5y agoAttrs was mentioned in the PEP [0] for dataclasses. [0] https://www.python.org/dev/peps/pep-0557/#why-not-just-use-attrs https://www.python.org/dev/peps/pep-0557/#why-not-just-use-a...
- willseth 5y agoExactly
- 4ec0755f5522 5y agoI started a project with dataclasses and quickly ran into their limitations (which are by design) and migrated to attrs. It's quite a bit better. If you take 10 seconds to read attrs website they do go over the differences and maybe discussing those would be more valuable than some cheap snark.
- willseth 5y agoI know what attrs is, thanks. “Everyone should use X library” is always bad advice, and it’s especially bad when there is language native functionality that covers common use cases for the library. Python has a dependency problem, maybe we shouldn’t make it worse with libraries most people don’t need.