On 07/05/2020 10:11, Steven D'Aprano wrote:
On Sat, May 02, 2020 at 05:12:58AM -0000, Ahmed Amr wrote:

Currently, when comparing a list of items to an array of the same
items for equality (==) it returns False, I'm thinking that it would
make sense to return True in that context, as we're comparing item
values and we have the same way of indexing both collections, so we
can compare item values.

I'm going to throw out a wild idea (actually not that wild :-) that I'm
sure people will hate for reasons I shall mention afterwards.

Perhaps we ought to add a second "equals" operator?

The biggest argument against a second "equals" operator, however it is spelt, is confusion. Which of these two operators do I want to use for this subtly different question of equality? Even where we have quite distinct concepts like "==" and "is", people still get muddled. If we have "==" and "=OMG=" or whatever, that would just be an accident waiting to happen.

Cheers,
        Rhodri

--
Rhodri James *-* Kynesim Ltd
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/A2WS4OAVFIROJ5T5WPVCS2XK2IZEWEVU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to