[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:39:39 CET 2011


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

On Fri, Feb 25, 2011 at 8:29 PM, Antoine Pitrou <report at bugs.python.org> wrote:
..
>> For other spellings like "utf8" or "latin1", I wonder if it would be
>> useful to emit a warning/suggestion to use the standard spelling.
>
> No, it would be an useless annoyance.

If we ever decide to get rid of codec aliases in the core and require
users to translate names found in various internet standards to
canonical Python spellings, we will have to issue deprecation warnings
before that.

As long as we recommend using say XML encoding metadata as is, we
cannot standardize on Python spellings because they differ from XML
standard.  (For example, Python uses "latin-1" and proper XML only
accepts "latin1". Of course, we can ask everyone to use iso-8859-1
instead, but how many users can remember that name?)

----------
title: b'x'.decode('latin1') is	much	slower	than	b'x'.decode('latin-1') -> b'x'.decode('latin1') is much slower than b'x'.decode('latin-1')

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


More information about the Python-bugs-list mailing list