Karthikeyan Singaravelan <tir.kar...@gmail.com> added the comment: 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'] ---------- nosy: +xtreak _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36100> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com