According to PEP 8, how should you test whether a variable x refers to None?
Correct answer C. x is None
Explanation
PEP 8 says comparisons to singletons such as None should always use is or is not, never the equality operators. None is a single object, so an identity test is exact, whereas == could be overridden by a class's __eq__ method and give a misleading result.
Answer checked How we write and check questions
Discussion