[Python-checkins] bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)

miss-islington webhook-mailer at python.org
Tue Dec 29 07:55:40 EST 2020


https://github.com/python/cpython/commit/cc7f745e80bc177dfc746b057e1c7656b78382e5
commit: cc7f745e80bc177dfc746b057e1c7656b78382e5
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2020-12-29T04:55:33-08:00
summary:

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 84402eb11086f97d31164aaa23e7238da3464f41)

Co-authored-by: Michael Wayne Goodman <goodman.m.w at gmail.com>

files:
M Doc/library/pyexpat.rst

diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst
index e43b9aecd8683..034e579315de0 100644
--- a/Doc/library/pyexpat.rst
+++ b/Doc/library/pyexpat.rst
@@ -665,14 +665,14 @@ The ``errors`` module has the following attributes:
 
 .. data:: codes
 
-   A dictionary mapping numeric error codes to their string descriptions.
+   A dictionary mapping string descriptions to their error codes.
 
    .. versionadded:: 3.2
 
 
 .. data:: messages
 
-   A dictionary mapping string descriptions to their error codes.
+   A dictionary mapping numeric error codes to their string descriptions.
 
    .. versionadded:: 3.2
 



More information about the Python-checkins mailing list