Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #70701

Re: Inconsistent viewkeys behaviour

From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Re: Inconsistent viewkeys behaviour
Date 2014-04-29 12:08 +1200
Message-ID <bs88shF6fvqU1@mid.individual.net> (permalink)
References <CAN1F8qWEO6N6MOXpFUM0rNa9nNAjF79WOD+De9n1pFZpibDF-w@mail.gmail.com> <mailman.9546.1398680984.18130.python-list@python.org>

Show all headers | View raw


Terry Reedy wrote:
> The left operand determines the result. The manual specifies that < and 
>  > do not have to be consistent. But I suspect that when 3.x dict.keys() 
> was backported to 2.7.0, no one thought to update set, whereas the 
> backported key view code already had the comparison.

The question is why set() is raising an exception
instead of returning NotImplemented to give the
other operand a chance.

-- 
Greg

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Inconsistent viewkeys behaviour Terry Reedy <tjreedy@udel.edu> - 2014-04-28 06:28 -0400
  Re: Inconsistent viewkeys behaviour Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-04-29 12:08 +1200

csiph-web