Both Mapping and Set provide __eq__ and __ne__.  I was wondering why not 
have Sequence do the same?


class Sequence(Sized, Reversible, Container):

    def __eq__(self, other):
        if not isinstance(other, Sequence):
            return NotImplemented
        if len(self) != len(other):
            return False
        for a, b in self, other:
            if a != b:
                return False
        return True
_______________________________________________
Python-ideas mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to