On Oct 4, 2014, at 16:23, Paul Moore email@example.com wrote:
On 4 October 2014 11:26, Steven D'Aprano firstname.lastname@example.org wrote:
I don't see a use for supporting the full range of regexes. As far as I am concerned, globbing is complicated enough for what I need, and full support for arbitrary regexes is YAGNI.
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))
IIRC, the perl UCD CPAN package and the ruby unicodedata gem expose the name to code and code to name mappings as hashes. Doing the equivalent in Python would allow you to do anything you want (including exactly that same line of code).