Created
January 23, 2018 05:29
-
-
Save shibli049/0d92b84b5cdc0d9a556879445bd30387 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): | |
self.num += 1 | |
return self.num == 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