Skip to content

Should ArtistList implement __add__? #19890

Description

@anntzer

Problem

ArtistList (#18216) is great :) but I realized that I had a few places in my old programs where I was doing e.g. ax.lines + ax.images + ..., which now breaks because there's no ArtistList.__add__. Instead one can do [*ax.lines, *ax.images, ...] but perhaps implementing ArtistList.__add__ may help with the transition?

Proposed Solution

Implement ArtistList.__add__ (which should only add ArtistLists and/or lists, and return plain lists). ArtistList.__iadd__ should probably also be implemented as throwing an exception (or emitting a deprecation warning), as direct modification of ArtistLists is currently being deprecated.

Additional context and prior art

N/A

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions