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

Add support for generic dataclasses #1

Open
mthuurne opened this issue Jan 12, 2023 · 0 comments
Open

Add support for generic dataclasses #1

mthuurne opened this issue Jan 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@mthuurne
Copy link
Member

mthuurne commented Jan 12, 2023

A dataclass could be a generic class and a specialized version of it could be used as a field type.

There is no theoretical reason to not support this, but in practice it turns out to be rather tricky to properly support, in terms of the amount of code and tests required. The problem being that we'd have to substitute type arguments properly, including across base classes and collection types (like Iterable[T] where we'd have to substitute str for T).

I haven't run into a scenario yet where this feature is needed, so for now it has low priority.

@mthuurne mthuurne added the enhancement New feature or request label Jan 12, 2023
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

1 participant