Why does __ne__ exist?

Ben Finney ben+python at benfinney.id.au
Sun Jan 7 18:55:15 EST 2018


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




More information about the Python-list mailing list