Created
November 17, 2014 22:00
-
-
Save jdswinbank/54c91ecd38b39a4bb3fe 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 Foo(int): | |
def __add__(self, other): | |
return -1 | |
print Foo(2) + 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can do:
class int(int):
def add(self, other):
return self - other