STINNER Victor added the comment: It looks like the email module has a special usage of the "us-ascii" encoding name. It's not just an alias to "ascii". So I proposed a patch implementing the fast-path differently in the Python builtin codecs: see my issue #27938.
The xml.etree module has special cases for the "us-ascii" encoding name, but not for "ascii". See the ElementTree.write() method. I proposed to also skip the XML declaration by default when "ascii" encoding is used: issue #27940. ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27915> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com