On 24 April 2012 10:18, Robert Kern <robert.k...@gmail.com> wrote:

> On 4/24/12 1:03 AM, Tim Delaney wrote:
>
>> On 24 April 2012 09:08, Devin Jeanpierre <jeanpierr...@gmail.com
>> <mailto:jeanpierr...@gmail.com**>> wrote:
>>
>>    On Mon, Apr 23, 2012 at 6:26 PM, Tim Delaney
>>    <timothy.c.dela...@gmail.com 
>> <mailto:timothy.c.delaney@**gmail.com<timothy.c.dela...@gmail.com>>>
>> wrote:
>>     > And doing that would make zero sense, because it directly
>> contradicts the
>>     > whole *point* of "is". The point of "is" is to tell you whether or
>> not two
>>     > references are to the same object. This is a *useful* property.
>>
>>    It's useful for mutable objects, yes. How is it useful for immmutable
>>    things? They behave identically everywhere where you don't directly
>>    ask the question of "a is b" or "id(a) == id(b)".
>>
>>
>> Not always. NaNs are an exception - they don't even compare equal to
>> themselves.
>> And hence a very good reason why "is" and == are separate operations.
>>
>
> I think you misread what Devin wrote. "id(a) == id(b)" not "a == b".


No - I was addressing "they behave identically everywhere ..." in the
quote. NaNs are a case whre they do not behave identically everywhere.

Tim Delaney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to