Annoying behaviour of the != operator
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Jun 8 23:40:55 EDT 2005
Jordan Rastrick wrote:
> Where are the 'number of situations' where __ne__ cannot be derived
> from __eq__? Is it just the floating point one? I must admit, I've
> missed any others.
The floating point one is just an example, it's not meant
to be the entire justification.
Some others:
* Numeric arrays, where comparisons return an array of
booleans resulting from applying the comparison to each
element.
* Computer algebra systems and such like, which return a
parse tree as a result of evaluating an expression.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list