The PEP 557 dataclasses module is one of the new features added in Python 3.7 and are a decorator which generates the boiler-plate code needed by a data container class. In addition to providing access to stored data values by name, they provide a easy mechanism for including additional features such as default values and customized ordering.
In this talk we will explore dataclasses from a data container perspective by asking several questions. - How should one use dataclasses? - What functionality do dataclasses provide? - How do these features compare to existing data structures in the standard library like NamedTuple, and dict? - What about the third-party package attrs? - What are some additional features of dataclasses? - When might one want to use dataclasses?