Skip to content

Instantly share code, notes, and snippets.

@narfdotpl
Created October 11, 2010 21:39
Show Gist options
  • Save narfdotpl/621290 to your computer and use it in GitHub Desktop.
Save narfdotpl/621290 to your computer and use it in GitHub Desktop.
Python 2.7 (r27:82500, Jul 6 2010, 21:27:24)
[GCC 4.2.1 (Apple Inc. build 5659)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> s = 'foo'
>>> s is s.lower()
False
>>> s is s.replace('a', 'b')
True
>>> s is s.replace('o', 'o')
False
Python 3.1.2 (r312:79147, Oct 11 2010, 23:34:00)
[GCC 4.2.1 (Apple Inc. build 5664)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> s = 'foo'
>>> s is s.lower()
True
>>> s is s.replace('a', 'b')
True
>>> s is s.replace('o', 'o')
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment