[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does __ne__ exist?

Chris Angelico <rosuav at gmail.com> writes:

> So, yeah, sounds like it's basically historical. I'm still not sure
> why it was done in the first place, but it looks like it's the sort of
> thing that wouldn't be done now.

I'm not understanding why you speculate that it wouldn't be done today.

We've established that it is useful to allow data types to define their
own meaning of ?equal? and ?not equal?, like many other operations. Is
that not good enough reason to allow it still?

 \          ?Science is what we understand well enough to explain to a |
  `\      computer. Art is everything else we do.? ?Donald Knuth, 1996 |
_o__)                                                                  |
Ben Finney