Hi Bengt,

On Sun, Jul 10, 2011 at 3:48 PM, Bengt Richter <b...@oz.net> wrote:
>  >>> id([1]) == id([2])
> True

As pointed out by Carl Friedrich, the real definition of "id" is:

* if x and y are two variables, then "x is y" <=> "id(x) == id(y)".

That's why in any Python implementation,

>>> x=[1]; y=[2]; id(x) == id(y)

must return False, but not necessarily id([1]) == id([2]).


A bientôt,

Armin.
_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to