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

Convert validphys.core objects to dataclasses #408

Open
Zaharid opened this issue Mar 21, 2019 · 0 comments
Open

Convert validphys.core objects to dataclasses #408

Zaharid opened this issue Mar 21, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@Zaharid
Copy link
Contributor

Zaharid commented Mar 21, 2019

Several validphys.core objects use a quick and dirty TupleComp base class to provide basic comparison functionality. Several of these classes outgrew namestuple at some point.

It works but it could be better. There is a nicer library solution in python 3.7 (and python 3.6 with an external library) which generates the various methods automatically, called dataclasses https://docs.python.org/3/library/dataclasses.html, which does that in a slightly nicer way. Using those for the objects in core would be a small win in maintainability and readability.

@scarlehoff scarlehoff added the enhancement New feature or request label Mar 15, 2024
@scarlehoff scarlehoff mentioned this issue Jul 25, 2024
33 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants