[New-bugs-announce] [issue42700] xml.parsers.expat.errors description of codes/messages is flipped

Michael Wayne Goodman report at bugs.python.org
Sun Dec 20 21:11:48 EST 2020


New submission from Michael Wayne Goodman <goodman.m.w at gmail.com>:

The documentation for xml.parsers.expat.errors.codes 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:`~xml.parsers.expat.errors.codes` mapping
   these messages back to the error codes, see below.

This issue appears to be present in the docs for all available versions.

----------
assignee: docs at python
components: Documentation
messages: 383481
nosy: docs at python, goodmami
priority: normal
severity: normal
status: open
title: xml.parsers.expat.errors description of codes/messages is flipped
versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42700>
_______________________________________


More information about the New-bugs-announce mailing list