[issue4510] ValueError for list.remove() not very helpful
report at bugs.python.org
Sat Jul 24 01:35:29 CEST 2010
Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:
Amaury, I agree about having a limit. It is a really bad idea to dump the full list repr for a potentially huge list or even for a small list of objects with huge individual reprs. We should limit the output to just a few characters at most or risk spewing pages of garbage into people's tracebacks and log files.
That being said, limiting the output defeats the original purpose of the feature request. ISTM that the proposal is only helpful in simple toy examples like [1,2,3].remove(4). With real world data, the new message is probably going to cause more harm than good. Accordingly, I recommend rejecting this feature request.
type: behavior -> feature request
versions: +Python 3.2 -Python 2.7, Python 3.1
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list