Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
Consider
foo= ["a","b"]foriin ["c"]:foo.remove(i)
This throws with a useless error message:
Traceback (most recent call last): File "/Users/tdegeus/Downloads/t.py", line 3, in <module> foo.remove(i)ValueError: list.remove(x): x not in list
Instead it would be very helpful to show the value ofx
. Now one needs extra manual debugging, or extra lines of code.