[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Mark Dickinson


Change by Mark Dickinson :


--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Mark Dickinson

Mark Dickinson  added the comment:

This is by design: int looks for characters with the Unicode Decimal (De) 
numeric type, corresponding to str.isdecimal(), rather than for the Digit (Di) 
or Numeric (Nu) numeric types.

>>> "²".isdecimal()
False

--
nosy: +mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46694] isdigit/isnumeric vs int()

2022-02-09 Thread Nonsense

New submission from Nonsense :

When typing in "²".isdigit() or "²".isnumeric() it gives True
but when typing in int("²") it errors out:
ValueError: invalid literal for int() with base 10: '²'

--
components: Interpreter Core
messages: 412934
nosy: smtplukas.tanner.test
priority: normal
severity: normal
status: open
title: isdigit/isnumeric vs int()
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com