Skip to content

Instantly share code, notes, and snippets.

@ChristopherMacGown
Created February 22, 2013 20:27
Show Gist options
  • Save ChristopherMacGown/5016315 to your computer and use it in GitHub Desktop.
Save ChristopherMacGown/5016315 to your computer and use it in GitHub Desktop.
>>> def do_this_thing_to_this(stuff, thing=lambda x: x):
... return thing(stuff)
...
>>> do_this_thing_to_this(12345)
12345
>>> do_this_thing_to_this(do_this_thing_to_this)
<function do_this_thing_to_this at 0x1016611b8>
>>> do_this_thing_to_this(do_this_thing_to_this, thing=do_this_thing_to_this)
<function do_this_thing_to_this at 0x1016611b8>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment