def does_string_have_currency_mark(s):
return bool(set(s) & set(unicode_categories['Sc'])
def does_string_have_numeric_digit(s): ...
... and so on. Those seem like questions one asks often enough. Not
every day, but more than never.
On Fri, Jun 2, 2023 at 4:59 PM Chris Angelico <[email protected]> wrote:
>
> On Sat, 3 Jun 2023 at 06:54, David Mertz, Ph.D. <[email protected]> wrote:
> >
> > If we're talking PyPI, it would be nice to have:
> >
> > unicode_categories = {"Zs": [...], "Ll": [...], ...}
> >
> > For all the various categories. It would just take one pass through
> > all the characters to generate it, but then every category would be
> > fast to access later. On the other hand, it's a few lines of code
> > with a lazy import. Probably not enough code to put on PyPI.
> >
>
> Question: What is the advantage of having this? What are the use-cases?
>
> ChrisA
> _______________________________________________
> Python-ideas mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at
> https://mail.python.org/archives/list/[email protected]/message/4ZFJWXPYS6TWU7XBA5G63RY5H4KGOSW2/
> Code of Conduct: http://python.org/psf/codeofconduct/
--
The dead increasingly dominate and strangle both the living and the
not-yet born. Vampiric capital and undead corporate persons abuse
the lives and control the thoughts of homo faber. Ideas, once born,
become abortifacients against new conceptions.
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at
https://mail.python.org/archives/list/[email protected]/message/ALTCCL6LRXS75PDVSZBGS5RGOHXJLPFC/
Code of Conduct: http://python.org/psf/codeofconduct/