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

Replace is_whitespace function with str.isspace #130

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Pennycook
Copy link
Contributor

Python provides a built-in method for checking if a character is whitespace, so we should use it.

Related issues

Part of #102.

Proposed changes

  • Replace custom is_whitespace function with str.isspace, which has exactly the same behavior.

Python provides a built-in method for checking if a character is whitespace, so
we should use it.

Signed-off-by: John Pennycook <[email protected]>
@Pennycook Pennycook added the refactor Improvements to code structure label Nov 15, 2024
@Pennycook Pennycook added this to the 2.0.0 milestone Nov 15, 2024
Copy link
Contributor

@laserkelvin laserkelvin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need whitespace_dict tattooed or engraved somewhere

@Pennycook Pennycook merged commit 4c607ca into intel:main Nov 26, 2024
3 checks passed
@Pennycook Pennycook deleted the isspace branch November 26, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvements to code structure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants