The Python 3 documentation for isdigit
says
Return true if all characters in the string are digits and there is at least one character, false otherwise. Digits include decimal characters and digits that need special handling, such as the compatibility superscript digits. Formally, a digit is a character that has the property value Numeric_Type=Digit or Numeric_Type=Decimal.
So it sounds like isdigit
should be a superset of isdecimal
. But then the docs for isdecimal
say
Return true if all characters in the string are decimal characters and there is at least one character, false otherwise. Decimal characters are those from general category “Nd”. This category includes digit characters, and all characters that can be used to form decimal-radix numbers, e.g. U+0660, ARABIC-INDIC DIGIT ZERO.
That sounds like isdecimal
should be a superset of isdigit
.
How are these methods related? Does one of them match a strict superset of what the other matches? Does the Numeric_Type property even have anything to do with the Nd category? (And is this contradictory documentation a documentation bug?)