Message336459
> 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() ?
Yes, I think that's correct. The characters matched by `str.isdecimal` are a subset of those matched by `str.isdigit`, which in turn are a subset of those matched by `str.isnumeric`. `int` and `float` required general category Nd, which corresponds to `str.isdigit`. |
|
Date |
User |
Action |
Args |
2019-02-24 10:57:40 | mark.dickinson | set | recipients:
+ mark.dickinson, StyXman, steven.daprano, xtreak |
2019-02-24 10:57:40 | mark.dickinson | set | messageid: <1551005860.15.0.254276561879.issue36100@roundup.psfhosted.org> |
2019-02-24 10:57:40 | mark.dickinson | link | issue36100 messages |
2019-02-24 10:57:40 | mark.dickinson | create | |
|