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

Change is/is not to ==/!= for literal comparisons #264

Merged
merged 1 commit into from
Dec 19, 2019

Conversation

HuidaeCho
Copy link
Member

This PR fixes SyntaxWarning: "is" with a literal. Did you mean "=="? warnings (new in Python 3.8?)

https://trac.osgeo.org/grass/ticket/4011

https://bugs.python.org/issue34850 (Python dev discussions)

using "is" with a literal is always a mistake

Maybe, also == None => is None and != None => is not None for better semantics?

@HuidaeCho HuidaeCho merged commit c2f3398 into OSGeo:master Dec 19, 2019
@HuidaeCho HuidaeCho deleted the is-with-literal branch December 19, 2019 16:27
landam pushed a commit to landam/grass that referenced this pull request Jan 28, 2020
petrasovaa pushed a commit to petrasovaa/grass that referenced this pull request Feb 18, 2020
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
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.

None yet

3 participants