[pypy-dev] x is y <=> id(x)==id(y)

Armin Rigo arigo at tunes.org
Mon May 6 16:03:53 CEST 2013

Hi Steven,

On Mon, May 6, 2013 at 3:12 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> I have no idea whether this is plausible, or if PyPy already does this, or
> whether I'm talking sheer nonsense.

PyPy already does this.

> Of course the IDs would have to be the same, and that's tricky, but I guess
> that's what this thread is about.

This is not tricky: the id is the bitpattern seen as an 8-bytes
integer.  This thread is about the harder cases of strings and tuples.

A bientôt,


More information about the pypy-dev mailing list