From bc344bb985104ba995ca51a83718e4b93e009f46 Mon Sep 17 00:00:00 2001 From: kovan Date: Tue, 3 Feb 2026 23:19:34 +0100 Subject: [PATCH] gh-140771: Add class directive for xmlparser in pyexpat docs Add a class directive for xmlparser so that all the :class:`xmlparser` references in the documentation resolve properly. Document that the type is available as xml.parsers.expat.XMLParserType. Co-Authored-By: Claude Opus 4.5 --- Doc/library/pyexpat.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index 2f5db81955c235..234d153adfa4fb 100644 --- a/Doc/library/pyexpat.rst +++ b/Doc/library/pyexpat.rst @@ -51,9 +51,15 @@ This module provides one exception and one type object: Alias for :exc:`ExpatError`. +.. class:: xmlparser + + The type of XML parser objects returned by the :func:`ParserCreate` function. + This type is available as ``xml.parsers.expat.XMLParserType``. + + .. data:: XMLParserType - The type of the return values from the :func:`ParserCreate` function. + Alias for :class:`xmlparser`. The :mod:`xml.parsers.expat` module contains two functions: