Ezio Melotti <[email protected]> added the comment:
Leaving named sequences for unicodedata.lookup() only (and not for \N{}) makes
sense.
The list of aliases is so small (11 entries) that I'm not sure using a binary
search for it would bring any advantage. Having a single lookup algorithm that
looks in both tables doesn't work because the aliases lookup must be in
_getcode for \N{...} to work, whereas the lookup of named sequences will happen
in unicodedata_lookup (Modules/unicodedata.c:1187).
I think we can leave the for loop over aliases in _getcode and implement a
separate (and binary) search in unicodedata_lookup for the named sequences.
Does that sound fine?
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue12753>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com