[issue25416] Add encoding aliases from the (HTML5) Encoding Standard
Ezio Melotti
report at bugs.python.org
Wed Oct 31 08:25:16 EDT 2018
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
Adding those aliases sounds good to me. I think it would be good to add some tests first (possibly as a separate issue/pr), even though I'm not sure what would be the best way to test the aliases.
Testing if the list is complete/correct should be done against the HTML5/Unicode specs, but that, if automated, would require downloading/parsing the specs and is probably not worth doing it.
We can also check that all the aliases are accepted by str.encode/decode, and all corresponding aliases should give the same result, however if str.encode/decode use the aliases dict, the test is nothing more than a sanity check and won't detect e.g. typos in the aliases names, or wrongly assigned aliases.
----------
nosy: +fbidu
stage: patch review -> test needed
versions: +Python 3.8 -Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue25416>
_______________________________________
More information about the Python-bugs-list
mailing list