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

Investigate a standard implementation of type-checking constructors for @dataclasses #107

Open
gunnar-mb opened this issue Feb 6, 2024 · 0 comments

Comments

@gunnar-mb
Copy link
Collaborator

The implementation of ifex_ast_construction.py adds init() functions to dataclasses and those init functions also do some checks of the input parameters to ensure they are using the right data type.

Since @dataclass is such a fundamental concept in python, (and combined with the typing library, as it is here) I imagine this kind of type-validation might already be implemented in some 3rd-party library, or maybe even supported somehow by Python itself.

If anyone is aware, this is a ticket to see if there is already an existing / better implementation of it because I expect that there is!
In that case, we can simplify things by removing the custom implementation, and improving quality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant