-
-
Save estevaofon/0919b6da082ce90a13483c393a51e3c2 to your computer and use it in GitHub Desktop.
int42
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 int42(int): | |
def __init__(self, n): | |
int.__init__(n) | |
def __add__(a, b): | |
return 42 | |
def __str__(n): | |
return '42' | |
a = int42(13) | |
b = int42(7) | |
print (a + b) | |
print (a) | |
print (b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment