'Is None' vs '== None' in Python
The reason for choosing1
egg is None
over1
egg == None
is: The operator “==” can be overloaded, and is likely to break when comparing valid object with None, while “is” always works the same.
reference page:
Stack Overflow Answer