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.11:44:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551008676.25.0.320923616218.issue36100@roundup.psfhosted.org>
In-reply-to
Content
Agreed, though str.isnumeric behavior might seem to be correct in terms of user who knows unicode internals the naming makes it easy to be used for a general user on trying to determine if the string can be used for int() without knowing unicode internals. I am not sure how this can be explained in simpler terms but it would be good if clarified in the docs to avoid confusion. 

There seems to be have been thread [0] in the past about multiple ways to check for a unicode literal to be number causing confusion. It adds more confusion on Python 2 where strings are not unicode by default.

$ python2.7
Python 2.7.14 (default, Mar 12 2018, 13:54:56)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> '\u00B2'.isdigit()
False
>>> u'\u00B2'.isdigit()
True

[0] https://mail.python.org/pipermail/python-list/2012-May/624340.html
History
Date User Action Args
2019-02-24 11:44:36xtreaksetrecipients: + xtreak, mark.dickinson, StyXman, steven.daprano
2019-02-24 11:44:36xtreaksetmessageid: <1551008676.25.0.320923616218.issue36100@roundup.psfhosted.org>
2019-02-24 11:44:36xtreaklinkissue36100 messages
2019-02-24 11:44:36xtreakcreate