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 <rep...@bugs.python.org>
<http://bugs.python.org/issue30507>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to