On 31/10/21 5:47 am, Raymond Bisdorff wrote:
Should the tuples comparison is in this case, I thought, not be solely based on the first tuple component?

Whether you think it should or shouldn't, the fact is that it's not.
This is documented in Section 5.6 of the Library Reference:

"tuples and lists are compared lexicographically by comparing corresponding elements. This means that to compare equal, every element must compare equal and the two sequences must be of the same type and have the same length."

--
Greg
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/PJ75PNVTHPIOZ5I4HLNU67YJT2NP7FRD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to