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

Bad form for value comparison #62

Open
dromer opened this issue Mar 19, 2020 · 1 comment
Open

Bad form for value comparison #62

dromer opened this issue Mar 19, 2020 · 1 comment

Comments

@dromer
Copy link

dromer commented Mar 19, 2020

All over the code we find examples like:

if a is not 'state' and hasattr(self, a):

Here value comparison is actually written as object comparison. This is clearly wrong.
Such statements should be written with == and != not with is and is not.

@dromer dromer changed the title Bad form for value comparisen Bad form for value comparison Mar 19, 2020
@moschopsuk
Copy link
Contributor

Happy for any PRs to address this 🙂

I've not had much free time recently to go over and address these.

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

No branches or pull requests

2 participants