[issue17331] Fix str methods for detecting digits with unicode
Mathieu Pasquet
report at bugs.python.org
Fri Mar 1 23:15:36 CET 2013
Mathieu Pasquet added the comment:
I understand the reasoning behind the feature, and the will to be unicode-compliant, but I think this might still break a lot of code (though it may never be detected).
I understand that isdecimal() is the safe way, because anything that is a decimal (Nd) can be translated to an integer by int() ; however, what is the recommended way to get something that isnumeric() into an int?
unicodedata.normalize('NFKD', num) or unicodedata.normalize('NFKC', num)?
Maybe str could have a method that does this, or methods performing exclusively on ascii values?
Sorry for the noise, I did not find issue 10557 when I searched.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17331>
_______________________________________
More information about the Python-bugs-list
mailing list