4 ms·
My solution to this is http://attrs.org http://attrs.org or dataclasses. They make a huge difference in readability and type safety.
by j88439h84 7y ago
My solution to this is http://attrs.org http://attrs.org or dataclasses. They make a huge difference in readability and type safety.
- siddboots 7y agoI feel like PEP557 missed an opportunity when it named data classes. The syntax is such an improvement that there is very little reason not to use them over ordinary classes for most purposes.
- j88439h84 7y agoPython probably should've just used attrs directly, like it does with setuptools, rather than making a whole new package.