Skip to content

Improve error message for Element.remove() #142306

@serhiy-storchaka

Description

@serhiy-storchaka

Feature or enhancement

Currently it imitates the error message for list.remove() and other collections: "Element.remove(x): element not found". But Element is not a general collection, so reasons for such error message are not applicable:

  1. It can only contain other elements.
  2. It may be useful to know what exact element was removed and from where. Their repr is limited, so it can be included in the error message.

Linked PRs

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions