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-June/134794.html below:

[Python-Dev] Internal representation of strings and Micropython

[Python-Dev] Internal representation of strings and Micropython [Python-Dev] Internal representation of strings and MicropythonGreg Ewing greg.ewing at canterbury.ac.nz
Thu Jun 5 02:57:16 CEST 2014
Glenn Linderman wrote:
> 
> so algorithms that walk two strings at a time cannot use the same 
> StringPosition to do so... yep, this is quite divergent from CPython and 
> Python.

They can, it's just that at most one of the indexing
operations would be fast; the StringPosition would
devolve into an int for the other one.

Such an algorithm would be of dubious correctness
anyway, since as you pointed out, codepoints and
characters are not quite the same thing. A codepoint
index in one string doesn't necessarily count off
the same number of characters in another string.
So to be safe, you should really walk each string
individually.

-- 
Greg
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