Grapheme clusters, a.k.a.real characters

Random832 random832 at fastmail.com
Thu Jul 20 12:10:14 EDT 2017


On Thu, Jul 20, 2017, at 01:15, Steven D'Aprano wrote:
> I haven't really been paying attention to Marko's suggestion in detail, 
> but if we're talking about a whole new data type, how about a list of 
> nodes, where each node's data is a decomposed string object guaranteed to 
> be either:

How about each node but the last has a fixed "length" (say, 16
characters), and random access below that size is done by indexing to
the node level and then walking forward.

I've thought about this in the past for encoding strings in UTF-8 with
O(1) random code point access.



More information about the Python-list mailing list