Repository navigation
Missing docstrings on some objects in the xml.etree C implementation. #126273
Description
Activity
- addedextension-modulesC modules in the Modules dirC modules in the Modules dir
on Nov 1, 2024 - changed the title
[-]xml.etree Python docstrings are replaced by empty clinic docstrings [/-][+]Missing docstrings on some objects in the `xml.etree` C implementation.[/+]on Nov 1, 2024 PR #156783 copies the docstrings from the Python implementation: 24 methods of
Element,TreeBuilderandXMLParser, plus the three class docstrings. The classes now also have a text signature, sohelp()andinspect.signature()work.This supersedes the closed PR #126274. The main remark in its review -- that inaccurate docs should be fixed first and the docstrings aligned with them -- is why I started with #156766, which fixes several incorrect statements in the reference (including the description of
keys()anditems(), whose docstrings claimed to return a list).I'd like to take this one.
Reading the issue, this looks like a documentation-clarity gap rather than a code defect: the current page doesn't give readers enough to self-diagnose, which is why it surfaces here as an issue instead of being answered by the docs.
Plan: locate the relevant section, confirm what the code actually does today (so the docs match behavior, not intent), tighten the wording, and scan neighboring pages for the same inconsistency — otherwise the fix just relocates the confusion.
One thing to confirm before writing: minimal correction scoped to this page, or also cross-link from related guides if the same gap shows up there?
(claiming via @LeonxLJX)
@LeonxLJX Please, read the issue before posting such comments. There is already a PR, and the comment above mentions it.
- added a commit that references this issue
on Sep 3, 2026 - added a commit that references this issue
on Oct 6, 2026
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsTodo
Documentation
E.g. the code below shows a blank string for makeelement even though ElementTree.py does have docstrings:
import xml.etree.ElementTree as ET; help(ET.fromstring("<a></a>").makeelement)Linked PRs