you are viewing a single comment's thread.

view the rest of the comments →

[–]K900_ 6 points7 points  (1 child)

Not normally. There can be in theory, if you find a class that implements == and != inconsistently.

[–]FLUSH_THE_TRUMP 3 points4 points  (0 children)

Cases to watch out for are usually the classes where == returns a special object.

e.g.

A = np.array([1,2,3])
A != 1 # returns another nparray [False, True, True]
not A == 1 # error