Skip to content

Commit 70ced2d

Browse files
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
The descriptions of the `codes` and `messages` dictionaries in `xml.parsers.expat.errors` were swapped, and this commit swaps them back. For example, `codes` maps string descriptions of errors to numeric error codes, not the other way around. (cherry picked from commit 84402eb) Co-authored-by: Michael Wayne Goodman <[email protected]>
1 parent 8f9313c commit 70ced2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/pyexpat.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,14 +665,14 @@ The ``errors`` module has the following attributes:
665665

666666
.. data:: codes
667667

668-
A dictionary mapping numeric error codes to their string descriptions.
668+
A dictionary mapping string descriptions to their error codes.
669669

670670
.. versionadded:: 3.2
671671

672672

673673
.. data:: messages
674674

675-
A dictionary mapping string descriptions to their error codes.
675+
A dictionary mapping numeric error codes to their string descriptions.
676676

677677
.. versionadded:: 3.2
678678

0 commit comments

Comments
 (0)