[issue26483] docs unclear on difference between isdigt() and isdecimal()

Ethan Furman report at bugs.python.org
Fri Mar 4 15:04:57 EST 2016


New submission from Ethan Furman:

The docs use different explanations for what constitutes a decimal verses a digit character; consequently I can't tell if they are the same or different, and if different what the differences are.

-----------------------------------------------

https://docs.python.org/3/library/stdtypes.html?#str.isdecimal

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.

-----------------------------------------------

https://docs.python.org/3/library/stdtypes.html?#str.isdigit

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.

----------
messages: 261195
nosy: ethan.furman
priority: normal
severity: normal
status: open
title: docs unclear on difference between isdigt() and isdecimal()
versions: Python 3.4, Python 3.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26483>
_______________________________________


More information about the Python-bugs-list mailing list