Open beauremus opened 3 years ago
The video also mentions an attr
package, which may work for Python 3.6.
It’s rigorously tested on Python 2.7, 3.5+, and PyPy.
So let's explore using attrs
. https://www.attrs.org/
ItemData
and ItemStatus
are two classes that come to mind that might benefit from this. Maybe the event class in the SYNC library, too. I don't think DPM
or DPMContext
would benefit.
Data Classes provide a simple and reliable way to implement a class with a standard set of features. Here's a demo, https://youtu.be/vBH6GRJ1REM.
This is dependent on a minimum Python version of 3.7.