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/2011-August/113268.html below:

[Python-Dev] PEP 393 review

[Python-Dev] PEP 393 review [Python-Dev] PEP 393 reviewVictor Stinner victor.stinner at haypocalc.com
Mon Aug 29 11:19:48 CEST 2011
Le 29/08/2011 11:03, Dirkjan Ochtman a écrit :
> On Sun, Aug 28, 2011 at 21:47, "Martin v. Löwis"<martin at v.loewis.de>  wrote:
>>   result strings. In PEP 393, a buffer must be scanned for the
>>   highest code point, which means that each byte must be inspected
>>   twice (a second time when the copying occurs).
>
> This may be a silly question: are there things in place to optimize
> this for the case where two strings are combined? E.g. highest
> character in combined string is max(highest character in either of the
> strings).

The "double-scan" issue is only for codec decoders.

If you combine two Unicode objects (a+b), you already know the highest 
code point and the kind of each string.

Victor
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