We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 123bbfd commit 546fb5fCopy full SHA for 546fb5f
1 file changed
Doc/library/stdtypes.rst
@@ -2156,6 +2156,20 @@ expression support in the :mod:`re` module).
2156
VULGAR FRACTION ONE FIFTH. Formally, numeric characters are those with the property
2157
value Numeric_Type=Digit, Numeric_Type=Decimal or Numeric_Type=Numeric.
2158
2159
+ For example::
2160
+
2161
+ >>> '0123456789'.isnumeric()
2162
+ True
2163
+ >>> '٠١٢٣٤٥٦٧٨٩'.isnumeric() #ARABIC-INDIC DIGIT ZERO TO NINE
2164
2165
+ >>> '⅕'.isnumeric() # VULGAR FRACTION ONE FIFTH
2166
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
2173
2174
.. method:: str.isprintable()
2175
0 commit comments