Jordan Rastrick wrote: > Mahesh raised the argument some posts back that Python should not 'just > guess' what you want. But the problem is, it *already does* - it > guesses you want object identity comparison if you haven't written > __ne__. But if __ne__ is not provided, than the negation of > > a==b > > is *surely* a better guess for a != b than the negation of > > a is b
The problem arises that, in the presence of rich comparisons, (a == b) is not always a boolean value, while (a is b) is always a boolean value. I *would* prefer that (a != b) raise an error when __ne__ isn't provided, but such is life until 3.0. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list