Skip to content

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

@skinkie

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.

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