Python: Why "is" keyword act different behavior when there is dot in the string?

Posted by S.Mark on Stack Overflow See other posts from Stack Overflow or by S.Mark
Published on 2010-05-18T15:18:56Z Indexed on 2010/05/18 15:20 UTC
Read the original article Hit count: 315

Filed under:
>>> x = "test"
>>> x is "test"
True
>>> x = "test.test"
>>> x is "test.test"
False

Can someone give me some hints why its like that?

© Stack Overflow or respective owner

Related posts about python