Skip to content

Conversation

elliotwutingfeng
Copy link
Contributor

The search space for str.isdecimal() is a subset of str.isdigit(). This helps to avoid expensive regex for strings beginning with "non-decimal digits" like ³. There appears to be no change in execution time for existing test cases.

"³".isdigit()
True
"³".isdecimal()
False

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant