[issue4510] ValueError for list.remove() not very helpful

Amaury Forgeot d'Arc report at bugs.python.org
Wed Jul 21 23:50:56 CEST 2010


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

The patch is good, except for two things:
when PyObject_Repr() fails, the word 'item' is put instead. This is a good idea, but PyErr_Clear() should be called as soon as possible, before calling another API function.
Also, the error message can grow without bounds. It would be better to limit the size of the string.

----------
nosy: +amaury.forgeotdarc

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


More information about the Python-bugs-list mailing list