oh wow... it gets better...

>>> x = "test!"
>>> y = "test!"
>>> x is y
False
>>> x = "test"
>>> y = "test"
>>> x is y
True
>>>

... I had no clue.
I guess the take-away lesson is to steer clear from any reliance on
object identity checks, if at all possible.  Are there any other such
"optimizations" one should like to know about?
v.

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

Reply via email to