[issue29853] Improve exception messages for remove and index methods

2017-03-19 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Non-informative error message in index() and remove() functions ___ Python tracker _

[issue29853] Improve exception messages for remove and index methods

2017-03-19 Thread Jim Fasarakis-Hilliard
Jim Fasarakis-Hilliard added the comment: I'd be happy to supply a PR for this if the change seems reasonable. -- ___ Python tracker ___ _

[issue29853] Improve exception messages for remove and index methods

2017-03-19 Thread Jim Fasarakis-Hilliard
New submission from Jim Fasarakis-Hilliard: Currently, there's a discrepancy in the exception reporting for the `.index` and `.remove` methods of many objects: For arrays: array.remove(val) -> ValueError: array.remove(x): x not in list array.index(val) -> ValueError: array.index(x):