Ben C wrote:
> On 2006-09-21, Fijoy George <[EMAIL PROTECTED]> wrote:

> > But my understanding does not explain the result of the second comparison.
> > According to the experiment, y[0] and y[1] are the same object!
>
> I'm as baffled as you, even more so its implication:

> >>> a = 2.
> >>> b = 2.
>
> >>> a is b
> False
>
> >>> a, b = 2., 2.
> >>> a is b
> True

It is suprising that it is easier to recognize identical constants
within the same expression?

-Mike

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

Reply via email to