[issue11303] b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

Alexander Belopolsky report at bugs.python.org
Sat Feb 26 02:50:02 CET 2011


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Fri, Feb 25, 2011 at 8:39 PM, Ezio Melotti <report at bugs.python.org> wrote:
..
> It would prefer to see the note added by Alexander in the doc mention *only* the preferred spellings
> (i.e. 'utf-8' and 'iso-8859-1') rather than all the variants that are actually optimized. One of the reasons
> that lead me to open #5902 is that I didn't like the inconsistencies in the encoding names (utf-8 vs utf8 vs
> UTF8 etc). Suggesting only one spelling per encoding will fix the problem.

I am fine with trimming the list.  In fact I deliberately did not
mention say UTF-8 variant even though it is also optimized.
Unfortunately, I don't think we have a choice between 'latin-1',
'latin1', and 'iso-8859-1'.  I don't think we should recommend
'latin-1' because this may cause people adding '-' to a very popular
and IANA registered 'latin1' variant and while 'iso-8859-1' is the
most pedantically correct spelling, it is very user unfriendly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11303>
_______________________________________


More information about the Python-bugs-list mailing list