This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: xml.parsers.expat.errors description of codes/messages is flipped
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, goodmami, miss-islington, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2020-12-21 02:11 by goodmami, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 23876 merged goodmami, 2020-12-21 02:39
PR 23994 merged miss-islington, 2020-12-29 12:33
PR 23995 merged miss-islington, 2020-12-29 12:33
Messages (5)
msg383481 - (view) Author: Michael Wayne Goodman (goodmami) * Date: 2020-12-21 02:11
The documentation for says:

   A dictionary mapping numeric error codes to their string descriptions.

But this is backwards. It should say it maps the string descriptions to the error codes. Likewise, the docs for xml.parsers.expat.errors.messages is backwards.

The other references to these dictionaries appear correct. For instance, under ExpatError.code:

   The :mod:`~xml.parsers.expat.errors` module also provides error message
   constants and a dictionary :data:`` mapping
   these messages back to the error codes, see below.

This issue appears to be present in the docs for all available versions.
msg383989 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-29 12:33
New changeset 84402eb11086f97d31164aaa23e7238da3464f41 by Michael Wayne Goodman in branch 'master':
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
msg383992 - (view) Author: miss-islington (miss-islington) Date: 2020-12-29 12:42
New changeset 70ced2dd27ee59abee9af6926e9ce7d93f06f885 by Miss Islington (bot) in branch '3.8':
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
msg383994 - (view) Author: miss-islington (miss-islington) Date: 2020-12-29 12:55
New changeset cc7f745e80bc177dfc746b057e1c7656b78382e5 by Miss Islington (bot) in branch '3.9':
bpo-42700: Swap descriptions in pyexpat.errors (GH-23876)
msg384003 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-12-29 13:39
Thank you for your contribution Michael.
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86866
2020-12-29 13:39:51serhiy.storchakasetstatus: open -> closed
versions: - Python 3.6, Python 3.7
messages: + msg384003

resolution: fixed
stage: patch review -> resolved
2020-12-29 12:55:39miss-islingtonsetmessages: + msg383994
2020-12-29 12:42:18miss-islingtonsetmessages: + msg383992
2020-12-29 12:33:38miss-islingtonsetpull_requests: + pull_request22837
2020-12-29 12:33:28miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request22836
2020-12-29 12:33:23serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg383989
2020-12-21 02:39:30goodmamisetkeywords: + patch
stage: patch review
pull_requests: + pull_request22738
2020-12-21 02:11:48goodmamicreate