Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap out is_all_ascii for built-in str.isascii #209

Merged
merged 2 commits into from
Nov 30, 2024

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Nov 30, 2024

https://docs.python.org/3/library/stdtypes.html#str.isascii was added in Python 3.7 and implements this check in native code which is much faster

@bdraco bdraco changed the title Swap out is_all_ascii for built-in isascii Swap out is_all_ascii for built-in str.isascii Nov 30, 2024
@bdraco bdraco marked this pull request as ready for review November 30, 2024 02:03
@saghul
Copy link
Owner

saghul commented Nov 30, 2024

Nice! I didn't know that was added!

@saghul saghul merged commit dc9a052 into saghul:master Nov 30, 2024
22 of 26 checks passed
@bdraco
Copy link
Contributor Author

bdraco commented Nov 30, 2024

Thanks

@bdraco bdraco deleted the built_in_isascii branch November 30, 2024 14:52
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.

2 participants