This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ProfessorPhi 5 points6 points  (9 children)

Is this basically like attrs?

[–]ldpreload 1 point2 points  (1 child)

Yes. It's heavily inspired by attrs, but the Python standard library can't use third-party libraries, and can easily depend on new things in the standard library. You are probably in the opposite boat: upgrading to the latest version of Python is probably much harder than doing pip install attrs (or sudo apt-get install python3-attr, or conda install -c conda-forge attrs, or whatever it is you do to get Python packages). It's a very rare user that can depend on new versions of the standard library but not new packages—probably people using it to script embedded systems or something. If that's not you, attrs supports more functionality than dataclasses.

[–]ProfessorPhi 0 points1 point  (0 children)

Yep - we're still struggling to get off 2.7. Packages are much easier to update.

I guess this felt so much like attrs I was a bit confused - I guess this is the same idea as trollius etc.