[issue7252] list().index() should provide better error reporting

2011-11-07 Thread Éric Araujo
Éric Araujo added the comment: > FWIW, quickly grepping through the raises of ValueErrors in the 2.6 > stdlib doesn't bring up any other usage of repeat-with-fake-variable-x. #13349 begs to differ :) -- nosy: +eric.araujo ___ Python tracker

[issue7252] list().index() should provide better error reporting

2009-11-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: r76058 should do the trick. -- resolution: -> accepted status: open -> closed ___ Python tracker ___ ___

[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc
djc added the comment: I want the actual value in there, though! So I can spot the bug. -- ___ Python tracker ___ ___ Python-bugs-list

[issue7252] list().index() should provide better error reporting

2009-11-02 Thread Benjamin Peterson
Benjamin Peterson added the comment: How's "object is not in list"? -- nosy: +benjamin.peterson ___ Python tracker ___ ___ Python-bugs

[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc
djc added the comment: FWIW, quickly grepping through the raises of ValueErrors in the 2.6 stdlib doesn't bring up any other usage of repeat-with-fake-variable-x. -- ___ Python tracker _

[issue7252] list().index() should provide better error reporting

2009-11-02 Thread djc
New submission from djc : >>> a = 'b' >>> [].index(a) Traceback (most recent call last): File "", line 1, in ValueError: list.index(x): x not in list This is suboptimal. IMO it would be much more useful if the ValueError reported the actual value that wasn't in the list, like this: Traceback