This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2020年01月30日 07:41 by tuxskar, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Messages (2) | |||
|---|---|---|---|
| msg361016 - (view) | Author: Oscar (tuxskar) | Date: 2020年01月30日 07:41 | |
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 |
|||
| msg361025 - (view) | Author: Karthikeyan Singaravelan (xtreak) * (Python committer) | Date: 2020年01月30日 09:03 | |
This is a duplicate of issue33560. See also issue13349 which is the original duplicate. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:26 | admin | set | github: 83680 |
| 2020年01月30日 09:03:41 | xtreak | set | status: open -> closed superseder: Non-informative error message in index() and remove() functions nosy: + xtreak messages: + msg361025 type: behavior resolution: duplicate stage: resolved |
| 2020年01月30日 07:41:48 | tuxskar | create | |