4 ms·
I've become a heavy user of attrs, a small library that makes it easy to replace named tuples with a class that automatically includes initialisation and string
by foxylad 8y ago
I've become a heavy user of attrs, a small library that makes it easy to replace named tuples with a class that automatically includes initialisation and string representation functions.
So I'm very glad to see data classes bringing this to the core language.
- j88439h84 8y agoWhy? attrs does it already.
- steve_adams_86 8y agoI'm not a python dev, but isn't less dependencies generally better? Or is attrs in Python natively already?
- j88439h84 8y agoAttrs isn't in python natively. Not sure why less dependencies would be better though.
- Spiritus 8y agoOne less thing to worry about. Adds to build time etc.
- steve_adams_86 8y agoEvery dependency is one more thing that can go wrong in my mind. I always drop them at every opportunity. There are some exceptions. Like I really don't want form building to be in the standard library, and I don't want to write it myself. It is nice when your package manager only takes a short manage to fetch and build though, and you can have more confidence that any mistakes will be your own (under your control) rather than someone else's.
- Retra 8y agoPython does a lot of things that libraries can do. "Batteries included" and whatnot.