comparison with None

Alan Isaac aisaac at
Thu Apr 19 19:00:29 CEST 2007

"Steven D'Aprano" <steve at> wrote in message
news:pan.2007. at
> You shouldn't expect comparisons between types to
> sort the same from one version of Python to another, although they may,
> and in the future (Python 3) it is likely to become an error to compare
> incomparable objects.

Indeed, that was the basis of my original question.
I wondered why no exception was raised.

Alan Isaac

PS Note that the change you mention will conflict with
currently documented behavior:
"objects of different types always compare unequal".
So this seems like a large change.

More information about the Python-list mailing list