str.isnumeric and Cuneiforms

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu May 17 20:50:09 EDT 2012


On 2012年5月17日 21:32:29 +0200, Marco wrote:
> Is it normal the str.isnumeric() returns False for these Cuneiforms?
>> '\U00012456'
> '\U00012457'
> '\U00012432'
> '\U00012433'
>> They are all in the Nl category.

Are you sure about that? Do you have a reference?
It seems to me that they are not:
py> c = '\U00012456'
py> import unicodedata
py> unicodedata.numeric(c)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
ValueError: not a numeric character
Although it is possible that unicodedata is buggy, or perhaps just 
doesn't support the multilingual plane characters.
-- 
Steven


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /