On Fri, 13 Jul 2007 18:49:06 +0200, Wildemar Wildenburger
<[EMAIL PROTECTED]> wrote:

>Wildemar Wildenburger wrote:
>> x = [1, 2, 3]
>> y = [1, 2, 3]
>> id(x), id(y)
>> x == y
>> x is y
>>   
>Ooops!
>
>Make that:
>
>x = [1, 2, 3]
>y = [1, 2, 3]
>id(x); id(y)
>x == y
>x is y
>
>(had to be a semicolon there)

Not "had to be" since a discerning reader will note that the two
values in the list:

        >>> id(x), id(y)
        (19105872, 19091664)

are different, and can guess that id() means "address of".  But "nicer
to be" perhaps since it makes it even more clea rto discerning
readers, and more likely clear to others.  ;-)

        >>> id(x); id(y)
        19105872
        19091664

wwwayne
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to