]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 29 Dec 2020 12:42:05 +0000 (04:42 -0800)
committerGitHub <noreply@github.com>
Tue, 29 Dec 2020 12:42:05 +0000 (04:42 -0800)
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@gmail.com>
Doc/library/pyexpat.rst

index e43b9aecd86835a212b9bfa2367c4bc388f149d5..034e579315de00f9d6516534b46fb583f8ddb87e 100644 (file)
@@ -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