Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-96844: Improve error message of list.remove #106455

Merged
merged 3 commits into from Jul 5, 2023
Merged

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Jul 5, 2023

@corona10
Copy link
Member Author

corona10 commented Jul 5, 2023

Concern about large input -> #96844 (comment)
: It was already used for list.index method so that it will not be a issue


>>> a = []
>>> a.index(42)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: 42 is not in list

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I agree with the rationale on error message length in the issue. Maybe we can limit the error message length, but that's out of the scope of this minor change.

@corona10 corona10 merged commit 217f47d into python:main Jul 5, 2023
23 checks passed
@corona10 corona10 deleted the gh-96844 branch July 5, 2023 22:19
vstinner pushed a commit to vstinner/cpython that referenced this pull request Mar 18, 2024
vstinner added a commit to vstinner/cpython that referenced this pull request Mar 18, 2024
vstinner added a commit to vstinner/cpython that referenced this pull request Mar 18, 2024
vstinner added a commit to vstinner/cpython that referenced this pull request Mar 20, 2024
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants