Re: [Python-Dev] Identity implies equality

2011-04-28 Thread Nick Coghlan
On Fri, Apr 29, 2011 at 5:51 AM, Raymond Hettinger wrote: > *  x = obj implies x == obj   # assignment really works While I agree with your point of view regarding the status quo as a useful, practical compromise, I need to call out that particular example: >>> nan = float('nan') >>> x = nan >>>

Re: [Python-Dev] Identity implies equality

2011-04-28 Thread Laurens Van Houtven
On Thu, Apr 28, 2011 at 9:51 PM, Raymond Hettinger < raymond.hettin...@gmail.com> wrote: > Personally, I think the status quo is fine > and that practicality is beating purity. > +1 > > Raymond > cheers lvh ___ Python-Dev mailing list Python-Dev@pyth

[Python-Dev] Identity implies equality

2011-04-28 Thread Raymond Hettinger
ISTM there is no right or wrong answer. There is just a question of what is most useful. AFAICT, the code for dictionaries (and therefore the code for sets) has always had identity-implies-equality logic. It makes dicts blindingly fast for common cases. It also confers some nice properties like