File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -2155,19 +2155,20 @@ expression support in the :mod:`re` module).
21552155 that have the Unicode numeric value property, e.g. U+2155,
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.
2158+ For example:
21582159
2159- For example ::
2160+ .. doctest ::
21602161
21612162 >>> ' 0123456789' .isnumeric()
21622163 True
2163- >>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() #ARABIC-INDIC DIGIT ZERO TO NINE
2164+ >>> ' ٠١٢٣٤٥٦٧٨٩' .isnumeric() # Arabic-indic digit zero to nine
21642165 True
2165- >>> '⅕'.isnumeric() # VULGAR FRACTION ONE FIFTH
2166+ >>> ' ⅕' .isnumeric() # Vulgar fraction one fifth
21662167 True
2167- >>> '²'.isdigit (), '²'.isdecimal (), '²'.isnumeric()
2168- (True, False , True)
2168+ >>> ' ²' .isdecimal (), ' ²' .isdigit (), ' ²' .isnumeric()
2169+ (False, True , True)
21692170
2170- See also :meth: `isdecimal ` and :meth: `isdigit `. Numeric characters is a
2171+ See also :meth: `isdecimal ` and :meth: `isdigit `. Numeric characters are
21712172 decimal numbers superset.
21722173
21732174
You can’t perform that action at this time.
0 commit comments