[Python-Dev] _PyUnicode_CheckConsistency() too strict?
Antoine Pitrou
solipsis at pitrou.net
Mon Feb 3 18:35:39 CET 2014
On Mon, 03 Feb 2014 16:10:03 +0000
Phil Thompson <phil at riverbankcomputing.com> wrote:
>
> Why is a Latin-1 string considered inconsistent just because it doesn't
> happen to contain any characters in the range 128-255?
Because as Victor said, it allows for some optimization shortcuts (e.g.
a non-ASCII latin1 string cannot be equal to an ASCII string - no need
for a memcmp).
Regards
Antoine.
More information about the Python-Dev
mailing list