You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ValueError exception of tuple.index(x) gives imprecise error message #49745
>>> t = (0, 1, 2, 3, 4, 5, 6, 7)
>>> t.index(8)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: tuple.index(x): x not in list
The error message "x not in list" should have been "x not in tuple".
Please fix the error message of the index method of the tuple type.
Activity
Retro commentedon Mar 15, 2009
The error message "x not in list" should have been "x not in tuple".
Please fix the error message of the index method of the tuple type.
vstinner commentedon Mar 15, 2009
Attached patch fixes the error message.
benjaminp commentedon Mar 15, 2009
Fixed in r70385.