Skip to content

Instantly share code, notes, and snippets.

@pfreixes
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pfreixes/25b7f7713ac29f8aefba to your computer and use it in GitHub Desktop.
Save pfreixes/25b7f7713ac29f8aefba to your computer and use it in GitHub Desktop.
Is works because of immutability of integer python implementation
Boolean are integers, integers are immutable and immutable objects are shared along the life cycle of your programm. Then it comes true
>>> False is False
True
>>> 123 is 123
True
>>> [1] is [1]
False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment