Getting to Know Python 3.7- Data Classes, Async-Await and More
blog.heroku.com
blog.heroku.com
When 3.7 was first released, I created a library to use dataclasses and add some light type validation to them. The library grew and now also supports some basic serialization mapping.
I'd love some feedback/issues/PRs
There's also https://github.com/Fatal1ty/mashumaro for json serialization.
For more context see https://www.attrs.org/en/stable/why.html#data-classes and https://www.python.org/dev/peps/pep-0557/#why-not-just-use-a...
I'm not an OOP person, but to me, dataclasses seem like a solution in search of a problem. Or, even more nefariously, it seems akin to the Clojure model, if the core team didn't develop it, it won't be officially blessed.
I'm more than willing to hear the other side, but I've read some and watched a few talks on dataclasses, and while their implementation is neat, I cannot figure out how I'd used them on a regular basis.
As an OOP person, I would say that dataclasses are an incomplete solution to a complex, multi-faceted problem, and a solution which doesn't really solve any of those facets. It is pretty much unusable as it is; for any practical use you need to extend it based on the specific needs of your application. But then it makes more sense to use a more complete solution such as attrs, which covers a much wider set of problems.
Anyway, it is rough emotionally using Lisp languages infrequently but improvements in Python 3.7 as described in this article make it less painfull.