Skip to content

Instantly share code, notes, and snippets.

@fmasanori
Created May 7, 2014 00:01
Show Gist options
  • Save fmasanori/ec4d3a887bc81d1db163 to your computer and use it in GitHub Desktop.
Save fmasanori/ec4d3a887bc81d1db163 to your computer and use it in GitHub Desktop.
int42
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