Skip to content

Instantly share code, notes, and snippets.

@RenSys
Last active April 22, 2017 01:06
Show Gist options
  • Save RenSys/601de26f5c591f118b88e463f3a43ffc to your computer and use it in GitHub Desktop.
Save RenSys/601de26f5c591f118b88e463f3a43ffc to your computer and use it in GitHub Desktop.
Standard - Partial
from functools import partial
def raise_to_power(value, power):
return value ** power
square = partial(raise_to_power, power=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment