why () is () and [] is [] work in other way?
Devin Jeanpierre
jeanpierreda at gmail.com
Mon Apr 23 16:38:01 EDT 2012
On Mon, Apr 23, 2012 at 4:06 PM, Terry Reedy <tjreedy at udel.edu> wrote:
>> The only way to check if two values are the same or not is to compare
>> via is or compare the return values of id().
>
> To quote you, 'bollocks'. The right way to compare values is with value
> comparison operators.
I meant "the same object".
>
>> So you can say that is or
>>
>> id() are ill-defined, or you can say that the identity of new numbers
>> is ill-defined,
>
>
> 'numbers' do not have identity, at least not separate from value.
> Concrete computational process objects do.
I meant "number objects".
I hope I did not cause any genuine confusion.
-- Devin
More information about the Python-list
mailing list