Skip to content

Add support for generic dataclasses #1

Description

@mthuurne

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions