[issue13349] Non-informative error message in index() and remove() functions

Sean Ochoa report at bugs.python.org
Sat Nov 3 23:37:03 CET 2012


Sean Ochoa added the comment:

It seems that this has been fixed.  Using simple tests from msg147215:  

~/hg/cpython/working $ env-py3.3/bin/python
Python 3.3.0 (default, Nov  3 2012, 15:28:29) 
[GCC 4.7.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> [].index(list(range(1000)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: [0, 1, 2, 3, 4, 5, ... 995, 996, 997, 998, 999] is not in list
[60649 refs]
>>> class Foo: pass
... 
[60679 refs]
>>> [].index(Foo())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: <__main__.Foo object at 0x7f7fad31bc30> is not in list
[60677 refs]

----------

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


More information about the Python-bugs-list mailing list