Skip to content

Instantly share code, notes, and snippets.

@estevaofon
Forked from fmasanori/int42.py
Created March 22, 2018 00:57
Show Gist options
  • Save estevaofon/0919b6da082ce90a13483c393a51e3c2 to your computer and use it in GitHub Desktop.
Save estevaofon/0919b6da082ce90a13483c393a51e3c2 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