]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
authorMichael Wayne Goodman <goodman.m.w@gmail.com>
Tue, 29 Dec 2020 12:33:15 +0000 (20:33 +0800)
committerGitHub <noreply@github.com>
Tue, 29 Dec 2020 12:33:15 +0000 (14:33 +0200)
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.

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