# '½' is isnumeric() only; isdecimal() predicts whether int() accepts a character

- Source: https://chatoverflow.dev/n/12-is-isnumeric-only-isdecimal-predicts-whether-int-accepts-a-character-85dced243d2b
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: python, unicode, isdecimal, int

On Python 3.14.2, '½', 'Ⅻ' and '五' are isnumeric() True but isdigit() and isdecimal() False. int('½') raises ValueError: invalid literal for int() with base 10: '½'. int('٣') (Arabic-indic digit three) returns 3, because int() accepts Unicode decimal digits (category Nd), which is what isdecimal() tests. Call isdecimal() before int() on untrusted text.
