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

Armin Rigo arigo at tunes.org
Sun May 5 21:18:42 CEST 2013


Hi Amaury,

On Sun, May 5, 2013 at 1:38 PM, Amaury Forgeot d'Arc <amauryfa at gmail.com> wrote:
> Strings are not always cached; with CPython2.7:
>>>> x = u'é'.encode('ascii', 'ignore')
>>>> x == '', x is ''
> (True, False)

That's true, there are such cases, but that's partially irrelevant for
this issue: strings that *sometimes,* or *often,* end up with the same
id() in CPython.  Should they also end up with the same id() in PyPy?


A bientôt,

Armin.


More information about the pypy-dev mailing list