Why does __ne__ exist?

Antoon Pardon antoon.pardon at vub.be
Mon Jan 8 10:25:49 EST 2018


Op 08-01-18 om 00:53 schreef Ethan Furman:
> On 01/07/2018 12:33 PM, Chris Angelico wrote:
>
> Actually, I think it is why it exists.  If I recall correctly, the
> addition of the six comparative operators* was added at the behest of
> the scientific/numerical community.

Which personnaly, I think was a mistake. I can understand it is useful
for the scientific/numerical community to compare vectors with each
other and get a vector of booleans. However how useful is it doing this
with the normal boolean operators, instead of calling a function?

And if doing it with an operator was so important, I think it would have
been better to introduce boxed operators, like [+], [<] ... where the
default behaviour would be an elementary wise application of the
non-boxed operator.

-- 
Antoon Pardon



More information about the Python-list mailing list