Created
May 7, 2014 00:01
-
-
Save fmasanori/ec4d3a887bc81d1db163 to your computer and use it in GitHub Desktop.
int42
This file contains hidden or 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