Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Data Classes to more easily manage our classes #31

Open
beauremus opened this issue Jun 1, 2021 · 3 comments
Open

Use Data Classes to more easily manage our classes #31

beauremus opened this issue Jun 1, 2021 · 3 comments
Assignees
Labels
future Can't be done, blocked by other requirements

Comments

@beauremus
Copy link
Contributor

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.

@beauremus beauremus added the future Can't be done, blocked by other requirements label Jun 1, 2021
@rneswold
Copy link
Collaborator

rneswold commented Jun 1, 2021

The video also mentions an attr package, which may work for Python 3.6.

@beauremus
Copy link
Contributor Author

beauremus commented Jun 1, 2021

It’s rigorously tested on Python 2.7, 3.5+, and PyPy.

So let's explore using attrs. https://www.attrs.org/

@rneswold
Copy link
Collaborator

rneswold commented Jun 1, 2021

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.

@rneswold rneswold self-assigned this Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future Can't be done, blocked by other requirements
Projects
None yet
Development

No branches or pull requests

2 participants