comparison with None
aisaac at american.edu
Thu Apr 19 19:00:29 CEST 2007
"Steven D'Aprano" <steve at REMOVE.THIS.cybersource.com.au> wrote in message
news:pan.2007.04.19.07.04.43.363933 at REMOVE.THIS.cybersource.com.au...
> 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.
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