En Tue, 17 Jun 2008 23:04:16 -0300, Asun Friere <[EMAIL PROTECTED]> escribió:

> On Jun 17, 5:33 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> wrote:
>> En Tue, 17 Jun 2008 02:25:42 -0300, Lie <[EMAIL PROTECTED]> escribió:
>
>>
>> > Basically 'a is b' and 'not(a is b)' is similar to 'id(a) == id(b)'
>> > and 'not(id(a) == id(b))'
>>
>> No.
> ...
>> ... The above statement is not. A counterexample:
>>
>> py> [] is []
>> False
>> py> id([])==id([])
>> True
>>
> But that's not what he said, he used 'a' and 'b' which are names, not
> anonymous objects.
> Fairer would be,
> a = [];b = []
> id(a) == id(b)

If you limit yourself to interpret 'a' and 'b' as actual names, yes, the 
statement is true. But I thought of them as placeholders or metasyntactic names 
- like in "abs(x) returns the absolute value of x", where x may represent *any* 
expression, not just a single name. Under this general interpretation the 
statement is not true anymore.

(This thread is getting way above 10000cp...)

-- 
Gabriel Genellina

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

Reply via email to