Title: Partial Function Applications
Slug: partial_functions_applications
Summary: Partial Functions Applications in Python.
Date: 2016-01-23 12:00
Category: Python
Tags: Basics
Authors: Chris Albon
Partial function application allows us to create "functions" from other functions with pre-filled arguments. This can be very useful when we want to pipe the output of one function into a function requiring two functions.
In [5]:
from functools import partial
In [6]:
def multiply(x, y):
return x * y
In [7]:
double = partial(multiply, y=2)
In [8]:
double(3)
Out[8]: