Nevermind my previous question. I found the answer in "Learning
Python"

>>
Python internally caches and reuses short strings as an optimization,
there really is just a single string, 'spam', in memory, shared by S1
and S2; hence, the is identity test reports a true result. To trigger
the normal behavior, we need to use longer strings that fall outside
the cache mechanism:
<<


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to