[Python-Dev] Unicode character property methods
Guido van Rossum
guido@python.org
Mon, 06 Mar 2000 08:29:04 -0500
> As you may have noticed, the Unicode objects provide
> new methods .islower(), .isupper() and .istitle(). Finn Bock
> mentioned that Java also provides .isdigit() and .isspace().
>
> Question: should Unicode also provide these character
> property methods: .isdigit(), .isnumeric(), .isdecimal()
> and .isspace() ? Plus maybe .digit(), .numeric() and
> .decimal() for the corresponding decoding ?
What would be the difference between isdigit, isnumeric, isdecimal?
I'd say don't do more than Java. I don't understand what the
"corresponding decoding" refers to. What would "3".decimal() return?
> Similar APIs are already available through the unicodedata
> module, but could easily be moved to the Unicode object
> (they cause the builtin interpreter to grow a bit in size
> due to the new mapping tables).
>
> BTW, string.atoi et al. are currently not mapped to
> string methods... should they be ?
They are mapped to int() c.s.
--Guido van Rossum (home page: http://www.python.org/~guido/)