LJ <luisjoseno...@gmail.com>:

>>>> id(b[0])
> 45855552
[...]
>>>> id(b[2])
> 45855552
>
> Please correct me if I am wrong, but according to this b[2] and b[0]
> are the same object. Now,
>
>>>> b[0] is b[2]
> False

This is a true statement:

   If X is Y, then id(X) == id(Y).

However, this is generally not a true statement:

   If X is Y, then id(X) is id(Y).


Marko
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to