This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xtreak
Recipients StyXman, mark.dickinson, steven.daprano, xtreak
Date 2019-02-24.10:31:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551004310.02.0.906912622886.issue36100@roundup.psfhosted.org>
In-reply-to
Content
Not a unicode expert but searching along the lines there was a note added on issue10610 that int() is supported for characters of 'Nd' category. So to check if a string can be converted to integer with help of int() I should be using str.isdecimal() instead of str.isnumeric() ?

https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex

> The numeric literals accepted include the digits 0 to 9 or any Unicode equivalent (code points with the Nd property). See http://www.unicode.org/Public/10.0.0/ucd/extracted/DerivedNumericType.txt for a complete list of code points with the Nd property.


>>> [unicodedata.category(c) for c in '一二三四五']
['Lo', 'Lo', 'Lo', 'Lo', 'Lo']
>>> [unicodedata.category(c) for c in '\N{BENGALI DIGIT ONE}\N{BENGALI DIGIT TWO}']
['Nd', 'Nd']
History
Date User Action Args
2019-02-24 10:31:50xtreaksetrecipients: + xtreak, mark.dickinson, StyXman, steven.daprano
2019-02-24 10:31:50xtreaksetmessageid: <1551004310.02.0.906912622886.issue36100@roundup.psfhosted.org>
2019-02-24 10:31:50xtreaklinkissue36100 messages
2019-02-24 10:31:49xtreakcreate