[pypy-issue] [issue835] Different behaviors of 'is' and '==' than cpython

Amaury Forgeot d Arc tracker at bugs.pypy.org
Thu Aug 18 23:44:57 CEST 2011

Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

Even with CPython, comparing integers with 'is' is frowned upon.
This code relies on CPython sharing integer objects for small values, and can 
have different results on different versions of CPython.  An implementation 
detail, really.

pypy can even choose to *not* allocate an integer object at all!

nosy: +afa
status: unread -> invalid

PyPy bug tracker <tracker at bugs.pypy.org>

More information about the pypy-issue mailing list