File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -2156,6 +2156,20 @@ expression support in the :mod:`re` module).
21562156 VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property
21572157 value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric.
21582158
2159+ For example::
2160+
2161+ >>> '0123456789'.isnumeric()
2162+ True
2163+ >>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() #ARABIC-INDIC DIGIT ZERO TO NINE
2164+ True
2165+ >>> '⅕'.isnumeric() # VULGAR FRACTION ONE FIFTH
2166+ True
2167+ >>> '²'.isdigit(), '²'.isdecimal(), '²'.isnumeric()
2168+ (True, False, True)
2169+
2170+ See also :meth: `isdecimal ` and :meth: `isdigit `. Numeric characters is a
2171+ decimal numbers superset.
2172+
21592173
21602174.. method :: str.isprintable()
21612175
You can’t perform that action at this time.
0 commit comments