Last active
August 29, 2015 14:08
-
-
Save pfreixes/25b7f7713ac29f8aefba to your computer and use it in GitHub Desktop.
Is works because of immutability of integer python implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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