edualgo/eduAlgo

Comparison to singleton `True` should be `expr is True`

Closed this issue · 0 comments

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Consider using identity comparison with singleton

Describe the solution you'd like
A clear and concise description of what you want to happen.

32 if (hint == True): should be replaced with if (hint is True):

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Comparisons to the singleton objects, like True, False, and None, should be done with identity, not equality. Use is or is not.

Identity checks are faster than equality checks.