[issue21422] int << 0: return the number unmodified

STINNER Victor report at bugs.python.org
Mon May 12 23:18:41 CEST 2014


STINNER Victor added the comment:

> What I was doing wrong?

The "is" operator should only be used to compare identical objects. Small integers (range -5..255 if I remember correctly) are singletons. I prefer to not rely on this implementation detail in a unit test of the Python standard library.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21422>
_______________________________________


More information about the Python-bugs-list mailing list