Skip to content

Incorrect and missing statements in the xml.dom.pulldom documentation #156839

Description

@serhiy-storchaka

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixes3.15pre-release feature fixes, bugs and security fixes3.16new features, bugs and security fixesdocsDocumentation in the Doc dirtopic-XML

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions