On Wed, Feb 23, 2011 at 4:07 PM, Guido van Rossum <guido at python.org> wrote: > I'm guessing that one of these encoding names is recognized by the C > code while the other one takes the slow path via the aliasing code. This is absolutely right. In fact I am going to propose adding strcmp(lower, "latin1") to the following test in PyUnicode_AsEncodedString(): else if ((strcmp(lower, "latin-1") == 0) || (strcmp(lower, "iso-8859-1") == 0)) return PyUnicode_EncodeLatin1(... I'll open a separate issue for that. In Python's own stdlib and tests "latin1" is a more common spelling than "latin-1", so it makes sense to optimize it.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4