[Python-Dev] Internal representation of strings and Micropython
Serhiy Storchaka
storchaka at gmail.com
Thu Jun 5 09:54:03 CEST 2014
04.06.14 23:50, Glenn Linderman написав(ла):
> 3) (Most space efficient) One cached entry, that caches the last
> codepoint/byte position referenced. UTF-8 is able to be traversed in
> either direction, so "next/previous" codepoint access would be
> relatively fast (and such are very common operations, even when indexing
> notation is used: "for ix in range( len( str_x )): func( str_x[ ix ])".)
Great idea! It should cover most real-word cases. Note that we can scan
UTF-8 string left-to-right and right-to-left.
More information about the Python-Dev
mailing list