Last active
January 23, 2018 05:25
-
-
Save shibli049/8f94f452ca6d60aaee97b3bdc1462188 to your computer and use it in GitHub Desktop.
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
class MagicalObject(object): | |
def __init__(self, num): | |
self.num = num | |
def __eq__(self, other): | |
return type(self.num) == type(other) | |
a = MagicalObject(0) | |
print(a == 1 and a == 2 and a == 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment