[Python-Dev] Strange error importing a Pickle from 2.7 to 3.2
Alexander Belopolsky
alexander.belopolsky at gmail.com
Wed Feb 23 22:34:01 CET 2011
On Wed, Feb 23, 2011 at 4:23 PM, M.-A. Lemburg <mal at egenix.com> wrote:
..
> "Latin-1" is the official name and the one used internally by Python,
> so it would be good to have the test suite and Python code in general
> to use that variant of the name (just as "utf-8" is preferred over
> "utf8").
>
> Instead of adding more aliases to the C code, please change the
> encoding names in the stdlib and test suite.
I cannot agree with you on this one. Official or not, "latin-1" is
much less commonly used than "latin1". Currently decode("latin1") is
10x slower than decode("latin-1") on short strings. We already have
a check for "iso-8859-1" alias in PyUnicode_AsEncodedString(). Adding
"latin1" (and possibly "utf8" as well) is likely to speed up many
applications at minimal cost.
More information about the Python-Dev
mailing list