New submission from Michael Wayne Goodman <goodman....@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@python
components: Documentation
messages: 383481
nosy: docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue42700>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to