Bug report
Bug description:
It looks like in Python 3.14 the error message became less descriptive when indexing a non-existent item in list:
>>> uv run -p 3.13 python -c '["a"].index(1)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
["a"].index(1)
~~~~~~~~~~~^^^
ValueError: 1 is not in list
>>> uv run -p 3.14 python -c '["a"].index(1)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
["a"].index(1)
~~~~~~~~~~~^^^
ValueError: list.index(x): x not in list
In 3.13 it's directly obvious 1 is not in list, and in Python 3.14 it refers to x where x is not even defined
CPython versions tested on:
3.14
Operating systems tested on:
macOS