On Sat, Aug 20, 2016 at 3:54 PM Michael Selik
wrote:
> On Fri, Aug 19, 2016 at 8:55 AM Neil Girdhar
> wrote:
>
>> Sure.
>>
>> http://bugs.python.org/issue27802
>>
>>
>> On Friday, August 19, 2016 at 8:36:39 AM UTC-4, Emanuel Barry wrote:
>>>
>>> Arek Bulski wrote:
>>>
>>> > Could use all(a==b fo
On Fri, Aug 19, 2016 at 8:55 AM Neil Girdhar wrote:
> Sure.
>
> http://bugs.python.org/issue27802
>
>
> On Friday, August 19, 2016 at 8:36:39 AM UTC-4, Emanuel Barry wrote:
>>
>> Arek Bulski wrote:
>>
>> > Could use all(a==b for zip(seq,seq2))
>>
>>
>>
>> Or even `all(itertools.starmap(operator.e
Sure.
http://bugs.python.org/issue27802
On Friday, August 19, 2016 at 8:36:39 AM UTC-4, Emanuel Barry wrote:
>
> Arek Bulski wrote:
>
> > Could use all(a==b for zip(seq,seq2))
>
>
>
> Or even `all(itertools.starmap(operator.eq, zip(a, b)))` if you prefer,
> but this isn’t about how easy or cle
Right, of course that's better.
On Fri, Aug 19, 2016 at 8:01 AM Arek Bulski wrote:
> Could use all(a==b for zip(seq,seq2))
>
> -- Arkadiusz Bulski --
>
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/pytho
Arek Bulski wrote:
> Could use all(a==b for zip(seq,seq2))
Or even `all(itertools.starmap(operator.eq, zip(a, b)))` if you prefer, but
this isn’t about how easy or clever or obfuscated one can write that; it’s
about convenience. ABCs expose the lowest common denominator for concrete
classes of
Could use all(a==b for zip(seq,seq2))
-- Arkadiusz Bulski --
___
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/
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):
I mean zip(self, other)
On Friday, August 19, 2016 at 6:46:57 AM UTC-4, Neil Girdhar wrote:
>
> 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 n