I added a test case and a News entry per serhiy.storchaka's request.
https://github.com/python/cpython/pull/7465
I agree with fdrake's concerns about DOM's usefulness. DOM is not very Pythonic. I note that as long as Python has a DOM implementation, it follows the spec fairly closely. Element.removeAttributeNode() is the exception. All other minidom mutators (unpythonically) return the values that the standard requires, including the sister mutator setAttributeNode:
Node.insertBefore()
Node.appendChild()
Node.replaceChild()
Node.removeChild()
NamedNodeMap.removeNamedItem()
NamedNodeMap.removeNamedItemNS()
NamedNodeMap.setNamedItem()
Element.setAttributeNode()
Document.removeChild()
Document.renameNode() |