[Python-ideas] Extend unicodedata with a name search

Serhiy Storchaka storchaka at gmail.com
Sun Oct 5 15:04:26 CEST 2014


> I don't know how unicodedata is implemented, but would it be practical
> to simply expose a function that iterates over every name in the
> database? Then you could simply do
>
> (name for name in unicodedata.names() if name.startswith(prefix))

(unicodedata.name(c, '') for c in map(chr, range(sys.maxunicode)) if 
unicodedata.name(c, '').startswith(prefix))




More information about the Python-ideas mailing list