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

Ezio Melotti report at bugs.python.org
Sat Feb 26 02:39:05 CET 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

> For other spellings like "utf8" or "latin1", I wonder if it would be
> useful to emit a warning/suggestion to use the standard spelling.

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.

FWIW, the correct spelling is 'latin1', not 'latin-1', but I still prefer 'iso-8859-1' over the two.

(The note could also use some more ``'markup'`` for the encoding names.)

----------

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


More information about the Python-bugs-list mailing list