Content-Length: 381626 | pFad | https://github.com/python/cpython/pull/106455

67 gh-96844: Improve error message of list.remove by corona10 · Pull Request #106455 · python/cpython · GitHub
Skip to content

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

Merged
corona10 merged 3 commits into
python:mainfrom
corona10:gh-96844
Jul 5, 2023
Merged

gh-96844: Improve error message of list.remove#106455
corona10 merged 3 commits into
python:mainfrom
corona10:gh-96844

Conversation

@corona10

@corona10 corona10 commented Jul 5, 2023

Copy link
Copy Markdown
Member

@corona10

corona10 commented Jul 5, 2023

Copy link
Copy Markdown
Member Author

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

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

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
@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.

3 participants









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/python/cpython/pull/106455

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy