News for hackers. Stuff that matters.
Re:I use Attrs instead of Pydantic by maleldil on Thursday August 26, 2021 @09:02AM (#28314380)
What's the use case for Attrs in a post-dataclasses world? I use dataclasses all the time, and I've never felt the need to reach for Attrs. What am I missing out on?
Re:I use Attrs instead of Pydantic by nerdponx on Thursday August 26, 2021 @09:06AM (#28314412)
More configurability, slots by default, faster to create the class object. I've heard stories that loading a module with a lot of dataclasses defined in it can be really slow. Basically dataclasses are for the people who can't afford a 3rd-party dependency for whatever reason.
Re:I use Attrs instead of Pydantic by zbentley on Thursday August 26, 2021 @10:16AM (#28315267)
Substantially more customization hooks in attrs.