quantifiedcode / python-anti-patterns

An open collection of Python anti-patterns and worst practices.
https://quantifiedcode.github.io/python-anti-patterns
Other
1.71k stars 249 forks source link

Clarify why comparing things to none is discouraged #143

Open gandhis1 opened 4 years ago

gandhis1 commented 4 years ago

This page: http://docs.quantifiedcode.com/python-anti-patterns/readability/comparison_to_none.html

Is a little tautological, i.e. "it is preferred". I think it could elaborate more on why the == operator it is not preferred.

This could be used as a reference:

https://stackoverflow.com/questions/3257919/what-is-the-difference-between-is-none-and-none

adewes commented 4 years ago

Cool! Do you want to make a PR with this suggested edit?