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

Use is operator when comparing singletons. #623

Merged
merged 1 commit into from
May 24, 2020
Merged

Use is operator when comparing singletons. #623

merged 1 commit into from
May 24, 2020

Conversation

tdh8316
Copy link
Contributor

@tdh8316 tdh8316 commented May 24, 2020

This is not a significant change. But the documentation said that comparisons to singletons like None should always be done with is or is not, never the equality operators.

@hoadlck hoadlck added the enhancement New feature or request label May 24, 2020
@hoadlck hoadlck merged commit 3c45479 into sherlock-project:master May 24, 2020
@hoadlck
Copy link
Contributor

hoadlck commented May 24, 2020

Yes, you are right. I use is in None comparisons, but I tend to use equality checks for boolean expressions.

Thanks for the improvement!

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

Successfully merging this pull request may close these issues.

2 participants