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:07:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1551006461.71.0.390771447441.issue36100@roundup.psfhosted.org>
In-reply-to
Content
> `int` and `float` required general category Nd, which corresponds to `str.isdigit`.

Sorry, did you mean str.isdecimal? since there could be a subset where isdigit is True and isdecimal returns False. 

>>> '\u00B2'.isdecimal()
False
>>> '\u00B2'.isdigit()
True
>>> import unicodedata
>>> unicodedata.category('\u00B2')
'No'
>>> int('\u00B2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: invalid literal for int() with base 10: '²'

Is this worth an FAQ or an addition to the existing note on int that specifies characters should belong to 'Nd' category to add a note that str.isdecimal should return True
History
Date User Action Args
2019-02-24 11:07:41xtreaksetrecipients: + xtreak, mark.dickinson, StyXman, steven.daprano
2019-02-24 11:07:41xtreaksetmessageid: <1551006461.71.0.390771447441.issue36100@roundup.psfhosted.org>
2019-02-24 11:07:41xtreaklinkissue36100 messages
2019-02-24 11:07:41xtreakcreate