[issue30507] Elements reports it is a list on Element.remove
Jim Fasarakis-Hilliard
report at bugs.python.org
Mon May 29 10:49:29 EDT 2017
New submission from Jim Fasarakis-Hilliard:
Another splinter issue from issue13349. Currently, Element reports it's a list when remove is called on it:
from xml.etree.ElementTree import Element
Element('').remove(Element(''))
ValueError: list.remove(x): x not in list
>From what I understand, this was done in order for it to conform with the error reporting performed from the pure python implementation of Element. (side note: These also differ regarding the type of value supplied to .remove, the C implementation only wants instances of Element)
The message, imo, is confusing and should be changed to Element.remove(x): x not in Element.
----------
components: Library (Lib)
messages: 294697
nosy: Jim Fasarakis-Hilliard
priority: normal
severity: normal
status: open
title: Elements reports it is a list on Element.remove
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30507>
_______________________________________
More information about the Python-bugs-list
mailing list