bpo-33274: Compliance with DOM L1: return removed attribute#7465
bpo-33274: Compliance with DOM L1: return removed attribute#7465freddrake merged 2 commits intopython:masterfrom arikrupnik:removeAttributeNode
Conversation
freddrake
left a comment
There was a problem hiding this comment.
There should be a note in the xml.dom.minidom documentation about the change, but... I'm not at all sure how to reasonably fit it in, given the docs refer to the DOM Level 1 specification for actual API details.
We might just need to leave that out, aside from the change blurb.
| @@ -0,0 +1,3 @@ | |||
| W3C DOM Level 1 specifies return value of Element.removeAttributeNode() as | |||
| "The Attr node that was removed." xml.dom.minidom now complies with this | |||
| requirement | |||
There was a problem hiding this comment.
Trailing period, please. (Yes, I'm picky!)
|
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
|
I have made the requested changes; please review again |
|
Thanks for making the requested changes! @freddrake: please review the changes made to this pull request. |
|
@freddrake: Please replace |
W3C DOM Level 1[1] requires
removeAttributeNode()to return the removed node:removeAttributeNode: Removes the specified attribute.
Return Value: The Attr node that was removed.
Current implementation returns
None.[1]https://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#method-removeAttributeNode
https://bugs.python.org/issue33274