[New-bugs-announce] [issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

John Machin report at bugs.python.org
Sat Jan 14 01:54:13 CET 2012


New submission from John Machin <sjmachin at lexicon.net>:

import xml.etree.ElementTree as et
node = et.Element('x')
node.append(not_an_Element_instance)

2.7 and 3.2 produce no complaint at all.
2.6 and 3.1 produce an AssertionError.

However cElementTree in all 4 versions produces a TypeError.

Please fix 2.7 and 3.2 ElementTree to produce a TypeError.

----------
messages: 151210
nosy: sjmachin
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree: Element.append doesn't type-check its argument
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

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


More information about the New-bugs-announce mailing list