Node.insertBefore(), Node.removeChild() and Node.replaceChild() are documented as raising ValueError if the node is not a child of this node, but they raise NotFoundErr, which is not a ValueError.
>>> import xml.dom.minidom
>>> doc = xml.dom.minidom.parseString('<r><c/></r>')
>>> doc.documentElement.removeChild(doc.createElement('x'))
xml.dom.NotFoundErr
Element.removeAttribute() is documented as raising NotFoundErr if there is no matching attribute, and Element.removeAttributeNS() is documented as raising nothing. Both raise NotFoundErr, so the two descriptions contradict each other. The DOM specifies that removing an absent attribute has no effect, so this is a deviation of xml.dom.minidom and should be documented in its documentation.
Affects all maintained versions.
Linked PRs
Node.insertBefore(),Node.removeChild()andNode.replaceChild()are documented as raisingValueErrorif the node is not a child of this node, but they raiseNotFoundErr, which is not aValueError.Element.removeAttribute()is documented as raisingNotFoundErrif there is no matching attribute, andElement.removeAttributeNS()is documented as raising nothing. Both raiseNotFoundErr, so the two descriptions contradict each other. The DOM specifies that removing an absent attribute has no effect, so this is a deviation ofxml.dom.minidomand should be documented in its documentation.Affects all maintained versions.
Linked PRs