Comparisons to the singleton objects, like True, False, and None, should be done with identity, not equality. Use is or is not. <!--more--> Identity checks are faster than equality checks. Also, the equality checks can result in unintended behaviour in some cases. ## Examples: ### Bad practice: ```python 1 is …
Occurrences
There are 3 occurrences of this issue in the repository.
Description
Comparisons to the singleton objects, like
True
,False
, andNone
, should be done with identity, not equality. Useis
oris not
. <!--more--> Identity checks are faster than equality checks. Also, the equality checks can result in unintended behaviour in some cases. ## Examples: ### Bad practice: ```python 1 is …Occurrences
There are 3 occurrences of this issue in the repository.
See all occurrences on DeepSource → deepsource.io/gh/argo0n/NograBot/issue/PTC-W0068/occurrences/