Comparing incomparable types

The Python 3 changes doc says:
objects of different incomparable types always compare unequal to each other.
I don't think this is the right way to go. If you try to compare incomparable types, a TypeError exception should be thrown. For example, at the moment if you write 9 == 'hello' in Python it'll return false, but I think it should throw a TypeError.

No comments:

Post a Comment