A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-February/132220.html below:

[Python-Dev] _PyUnicode_CheckConsistency() too strict?

[Python-Dev] _PyUnicode_CheckConsistency() too strict? [Python-Dev] _PyUnicode_CheckConsistency() too strict?Phil Thompson phil at riverbankcomputing.com
Mon Feb 3 17:10:03 CET 2014
On 03-02-2014 4:04 pm, Victor Stinner wrote:
> 2014-02-03 Phil Thompson <phil at riverbankcomputing.com>:
>> Are you saying that code will fail if a particular Latin-1 string 
>> just
>> happens not to contains any character greater than 127?
>
> PyUnicode_FromKindAndData(PyUnicode_1BYTE_KIND, latin1_str, length)
> accepts latin1 and ASCII strings. It computes the maximum code point
> and then use ASCII or latin1 unicode string.
>
> Victor

That doesn't answer my original question, that just works around the 
use case I presented.

To restate...

Why is a Latin-1 string considered inconsistent just because it doesn't 
happen to contain any characters in the range 128-255?

Phil
More information about the Python-Dev mailing list

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