Skip to content

Think about covariant alternatives for list types, given that list is invariant #1171

Description

@skinkie

When mypy'ing my code the problem arrises when list[union[TypeA, TypeB]] is specified and a type like list[TypeA] is assigned. I wonder if the library should offer something like an AppendableSequence that is Covariant but does allow anding multiple items.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions