[New-bugs-announce] [issue5495] ValueError exception of tuple.index(x) gives imprecise error message

Retro report at bugs.python.org
Sun Mar 15 15:30:36 CET 2009


New submission from Retro <vinetouu at gmail.com>:

>>> 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.

----------
components: None
messages: 83633
nosy: Retro
severity: normal
status: open
title: ValueError exception of tuple.index(x) gives imprecise error message
versions: Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5495>
_______________________________________


More information about the New-bugs-announce mailing list