On Apr 5, 9:30 pm, Steve Holden <[EMAIL PROTECTED]> wrote:
>
> In fact all you can in truth say is that
>
>a is b --> a == b
>
You can't even guarantee that.
>>> inf = 1e1000
>>> nan = inf / inf
>>> nan is nan
True
>>> nan == nan
False
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> En Thu, 03 Apr 2008 19:27:47 -0300, <[EMAIL PROTECTED]> escribió:
>
>> Hi all,
>>
>> I've been playing around with the identity function id() for different
>> types of objects, and I think I understand its behaviour when it comes
>> to objects like lists and tuples in wh
En Thu, 03 Apr 2008 19:27:47 -0300, <[EMAIL PROTECTED]> escribió:
> Hi all,
>
> I've been playing around with the identity function id() for different
> types of objects, and I think I understand its behaviour when it comes
> to objects like lists and tuples in which case an assignment r2 = r1
> (
> Hi all,
>
> I've been playing around with the identity function id() for different
> types of objects, and I think I understand its behaviour when it comes
> to objects like lists and tuples in which case an assignment r2 = r1
> (r1 refers to an existing object) creates an alias r2 that refers to
[EMAIL PROTECTED] wrote:
> 1) Which of the above behaviours are reliable? For example, does a1 =
> a2 for ints and strings always imply that a1 is a2?
No.
> 2) From the programmer's perspective, are ids of ints, floats and
> string of any practical significance at all (since these types are
> im
On Apr 3, 11:27 pm, [EMAIL PROTECTED] wrote:
> Hi all,
>
> I've been playing around with the identity function id() for different
> types of objects, and I think I understand its behaviour when it comes
> to objects like lists and tuples in which case an assignment r2 = r1
> (r1 refers to an existi
Hi all,
I've been playing around with the identity function id() for different
types of objects, and I think I understand its behaviour when it comes
to objects like lists and tuples in which case an assignment r2 = r1
(r1 refers to an existing object) creates an alias r2 that refers to
the same o