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
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