-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Show value in error of list.remove #96844
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
Comments
What if What if the conversion of Maybe it could be done for known small good types and values. Then again, for example
shows:
|
Wouldn't we already have this problem with KeyError on dict lookups: >>> {}[1234]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: 1234 ? |
Now the error message is updated, here is the rationale why I agree with the updating error message even if for the possibility of large input. |
(cherry picked from commit 217f47d)
…h-106455)" (python#116956) This reverts commit 217f47d.
…h-106455)" (python#116956) This reverts commit 217f47d.
…h-106455)" (python#116956) This reverts commit 217f47d.
Consider
This throws with a useless error message:
Instead it would be very helpful to show the value of
x
. Now one needs extra manual debugging, or extra lines of code.Linked PRs
The text was updated successfully, but these errors were encountered: