Created
October 8, 2015 13:57
-
-
Save greylurk/9e66ef393e0be161e08f 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 StupidMath(): | |
def __init__(self, number): | |
self.number = number | |
def __add__(self, other): | |
return repr(self.number - other.number) + repr(self.number+other.number) | |
def __repr__(self): | |
return str(self.number) | |
print "{} + {} = {}".format(StupidMath(10), StupidMath(3), StupidMath(10) + StupidMath(3)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment