Consider having collections.abc.Sequence implement __eq__ and __ne__

Aug. 19, 2016
10:46 a.m.
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
3134
Age (days ago)
3134
Last active (days ago)
1 comments
1 participants
participants (1)
-
Neil Girdhar