Message361016
When trying to retrieve the index of an element that is not in a tuple the error message of ValueError is not showing the value looking for but instead a static message tuple.index(x): x not in tuple
>>> b = (1, 2, 3, 4)
>>> b.index(5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: tuple.index(x): x not in tuple
I would expect something like what happen in lists where the element (5 in this case) is showed on the ValueError.
>>> a = [1, 2, 3, 4]
>>> a.index(5)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: 5 is not in list |
|
Date |
User |
Action |
Args |
2020-01-30 07:41:48 | tuxskar | set | recipients:
+ tuxskar |
2020-01-30 07:41:48 | tuxskar | set | messageid: <1580370108.47.0.271074829024.issue39499@roundup.psfhosted.org> |
2020-01-30 07:41:48 | tuxskar | link | issue39499 messages |
2020-01-30 07:41:48 | tuxskar | create | |
|