On Sat, 9 May 2020 04:29:46 +1000 Steven D'Aprano <st...@pearwood.info> wrote:
> On Fri, May 08, 2020 at 07:52:10PM +0200, Alex Hall wrote: > > > Would the proposal come with a new magic dunder method which can be > > overridden, or would it be like `is`? > > An excellent question! I don't think there needs to be a dunder. Calling > this "sequence-equal": > > Two sequences are "sequence-equal" if: > > - they have the same length; > > - for each pair of corresponding elements, the two elements are > either equal, or sequence-equal. FWIW, the "or sequence-equal" part is what makes sequences of sequences "recursively equivalent." Without that, [(1, 2)] would not be sequence-equal to ([1, 2]). _______________________________________________ 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/3V5CALDX2A632LTYPFLWHQ3AGWD2TAIV/ Code of Conduct: http://python.org/psf/codeofconduct/