This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Arfrever, francismb, jcea, mark.dickinson, pitrou, python-dev, r.david.murray, rhettinger, serhiy.storchaka, vstinner
Date 2014-05-12.21:18:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1399929521.66.0.22538391131.issue21422@psf.upfronthosting.co.za>
In-reply-to
Content
> 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.
History
Date User Action Args
2014-05-12 21:18:41vstinnersetrecipients: + vstinner, rhettinger, jcea, mark.dickinson, pitrou, Arfrever, r.david.murray, python-dev, francismb, serhiy.storchaka
2014-05-12 21:18:41vstinnersetmessageid: <1399929521.66.0.22538391131.issue21422@psf.upfronthosting.co.za>
2014-05-12 21:18:41vstinnerlinkissue21422 messages
2014-05-12 21:18:41vstinnercreate