Skip to content

Instantly share code, notes, and snippets.

@taddeimania
Created November 14, 2015 00:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taddeimania/65e74abf43ccbc33bbf7 to your computer and use it in GitHub Desktop.
Save taddeimania/65e74abf43ccbc33bbf7 to your computer and use it in GitHub Desktop.
Object + Function = Hello World!
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