Hi:
I am confused at string identity test:
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> a="test"
>>> b="test"
>>> a is b[/color][/color][/color]
True[color=blue][color=green][color=darkred]
>>>[/color][/color][/color]
About identity, I think a is not b, but "a is b" returns True.
Does that mean equality and identity is the same thing for strings?
I am confused at string identity test:
Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright" , "credits" or "license" for more information.[color=blue][color=green][color=darkred]
>>> a="test"
>>> b="test"
>>> a is b[/color][/color][/color]
True[color=blue][color=green][color=darkred]
>>>[/color][/color][/color]
About identity, I think a is not b, but "a is b" returns True.
Does that mean equality and identity is the same thing for strings?
Comment