From: Michael Wayne Goodman Date: Tue, 29 Dec 2020 12:33:15 +0000 (+0800) Subject: bpo-42700: Swap descriptions in pyexpat.errors (GH-23876) X-Git-Tag: v3.10.0a4~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84402eb11086f97d31164aaa23e7238da3464f41;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Doc/library/pyexpat.rst b/Doc/library/pyexpat.rst index e43b9aecd868..034e579315de 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