You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Missing docstrings on some objects in the xml.etree C implementation. #126273
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, TreeBuilder and XMLParser, plus the three class docstrings. The classes now also have a text signature, so help() and inspect.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() and items(), whose docstrings claimed to return a list).
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?
Activity
[-]xml.etree Python docstrings are replaced by empty clinic docstrings [/-][+]Missing docstrings on some objects in the `xml.etree` C implementation.[/+]serhiy-storchaka commentedon Sep 1, 2026
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).LeonxLJX commentedon Sep 3, 2026
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)
serhiy-storchaka commentedon Sep 3, 2026
@LeonxLJX Please, read the issue before posting such comments. There is already a PR, and the comment above mentions it.
gh-126273: Add missing docstrings in the C implementation of xml.etree (
pythongh-126273: Add missing docstrings in the C implementation of xm…
gh-126273: Fix make clinic warnings (#158892)