The documentation of xml.dom.pulldom does not match the behaviour in several places, a part of the API is not documented, and the module has no docstrings at all.
- The node is said to be a
Document, Element or Text, but the PROCESSING_INSTRUCTION event carries a ProcessingInstruction node and the COMMENT event a Comment node.
- It is not said that
getEvent() returns None at the end of the document.
parseString() is documented as taking a "(Unicode) string"; it accepts only str, and bytes raise TypeError.
- The nodes are referenced as
xml.dom.minidom.Document and so on, but Doc/library/xml.dom.minidom.rst documents no classes, so these references do not resolve. The nodes are created by the DOM implementation passed as documentFactory, so the xml.dom interfaces should be referenced instead.
- The eight event constants are referenced with the
:data: role, but none of them is documented, so these references do not resolve either.
PullDOM and SAX2DOM are documented as "Subclass of xml.sax.handler.ContentHandler" and nothing else, and the documentFactory argument is not explained.
- The arguments of
DOMEventStream are not documented, reset() has no description at all, and clear() is not documented.
- The module, its classes and their methods have no docstrings.
Unrelated to the module itself, the documentation of xml.dom contains a commented out paragraph about pulldom which was never rendered and refers to a site which no longer exists.
Linked PRs
The documentation of
xml.dom.pulldomdoes not match the behaviour in several places, a part of the API is not documented, and the module has no docstrings at all.Document,ElementorText, but thePROCESSING_INSTRUCTIONevent carries aProcessingInstructionnode and theCOMMENTevent aCommentnode.getEvent()returnsNoneat the end of the document.parseString()is documented as taking a "(Unicode) string"; it accepts onlystr, and bytes raiseTypeError.xml.dom.minidom.Documentand so on, butDoc/library/xml.dom.minidom.rstdocuments no classes, so these references do not resolve. The nodes are created by the DOM implementation passed as documentFactory, so thexml.dominterfaces should be referenced instead.:data:role, but none of them is documented, so these references do not resolve either.PullDOMandSAX2DOMare documented as "Subclass ofxml.sax.handler.ContentHandler" and nothing else, and the documentFactory argument is not explained.DOMEventStreamare not documented,reset()has no description at all, andclear()is not documented.Unrelated to the module itself, the documentation of
xml.domcontains a commented out paragraph about pulldom which was never rendered and refers to a site which no longer exists.Linked PRs