Skip to content

removed a singleton-comparison pitfall - #244

Open
NaelsonDouglas wants to merge 1 commit into
corpnewt:masterfrom
python-pitfalls:master
Open

removed a singleton-comparison pitfall#244
NaelsonDouglas wants to merge 1 commit into
corpnewt:masterfrom
python-pitfalls:master

Conversation

@NaelsonDouglas

Copy link
Copy Markdown

The problem
In Python when comparing to singletons, the use of the operator 'is' instead of '==' is encouraged.
This pitfall was detected using Pylint, under the code C0121
More about it can be found here: https://vald-phoenix.github.io/pylint-errors/plerr/errors/basic/C0121.html

Solution
Replaced '==' to 'is' when comparing to singletons

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.

1 participant