Created
November 14, 2015 00:52
-
-
Save taddeimania/65e74abf43ccbc33bbf7 to your computer and use it in GitHub Desktop.
Object + Function = Hello World!
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 Number(int): | |
def __add__(self, fn): | |
return fn(self) | |
Number(5) + (lambda x: print("hello world")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment