Skip to content

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

Merged
saghul merged 2 commits intosaghul:masterfrom
bdraco:built_in_isascii
Nov 30, 2024
Merged

Swap out is_all_ascii for built-in str.isascii#209
saghul merged 2 commits intosaghul:masterfrom
bdraco:built_in_isascii

Conversation

@bdraco
Copy link
Collaborator

@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
@bdraco
Copy link
Collaborator 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