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

Brett Cannon report at bugs.python.org
Fri May 26 14:15:14 EDT 2017


Brett Cannon added the comment:

A potential compromise would be if ValueError gained a 'value' attribute. That would allow for the exception message to be static but still provide the information for introspection later if desired to figure out exactly what object led to the cause of the ValueError. If I remember correctly previous objections to this idea was worry about memory, though, so it seems attaching more information about the trigger of a ValueError will inevitably lead to more cost somehow.

----------

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


More information about the Python-bugs-list mailing list