File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -2008,7 +2008,16 @@ expression support in the :mod:`re` module).
20082008 otherwise. Decimal characters are those that can be used to form
20092009 numbers in base 10, e.g. U+0660, ARABIC-INDIC DIGIT
20102010 ZERO. Formally a decimal character is a character in the Unicode
2011- General Category "Nd".
2011+ General Category "Nd". For example::
2012+
2013+ .. doctest ::
2014+
2015+ >>> ' 0123456789' .isdecimal()
2016+ True
2017+ >>> ' ٠١٢٣٤٥٦٧٨٩' .isdecimal() # ARABIC-INDIC DIGIT ZERO TO NINE
2018+ True
2019+ >>> ' alphabetic' .isdecimal()
2020+ False
20122021
20132022
20142023.. method :: str.isdigit()
@@ -2020,7 +2029,6 @@ expression support in the :mod:`re` module).
20202029 like the Kharosthi numbers. Formally, a digit is a character that has the
20212030 property value Numeric_Type=Digit or Numeric_Type=Decimal.
20222031
2023-
20242032.. method :: str.isidentifier()
20252033
20262034 Return ``True `` if the string is a valid identifier according to the language
You can’t perform that action at this time.
0 commit comments