Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Unsupported operand types for + (List[A] and List[B]) when B extends A #3933

Open
@henryJack

Description

@henryJack

If I have:

Class A:Class B(A):

Then If I try to add lists of these two objects you get the following mypy error:
error: Unsupported operand types for + (List[A] and List[B])

Any ideas for a work around on this one? Surely the inferred type should beList[Union[A, B]

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp