[issue11773] Unicode compared using is results in abnormal behavior
New submission from Abhijeet Rastogi abhijeet.1...@gmail.com: a = u'0' a is u'0' False a == u'0' True -- components: Unicode messages: 133038 nosy: shadyabhi priority: normal severity: normal status: open title: Unicode compared using is results in abnormal behavior type: behavior versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11773] Unicode compared using is results in abnormal behavior
Ezio Melotti ezio.melo...@gmail.com added the comment: The fact that is works in this way here is just an implementation detail. If you want to compare strings use ==, is is used to verify if two variables refer to the same object or not. x = 100 x is 100 True x = 1000 x is 1000 False -- nosy: +ezio.melotti resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11773 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com