How does compare work?

Terry Reedy tjreedy at udel.edu
Mon Jan 26 18:30:32 EST 2004


"Helmut Jarausch" <jarausch at skynet.be> wrote in message
news:40158680$0$7044$ba620e4c at news.skynet.be...
> what does Python do if two objects aren't comparable (to my opinion)

Sorry, Python does what it does, which is generally to compare any two
objects unless explicitly disabled as with complex numbers or in
user-written method of user class.

> If I've understood "Python in a Nutschell" correctly it should raise an
> exception but it doesn't do for me.

Perhaps you could quote the line that mislead you, and someone could
explain, or suggest a change to the author.

Terry J. Reedy







More information about the Python-list mailing list