text: Partial function application in Python | TechRepublic
  Python is not an inherently functional language, but with the help of the functools library you can write some programs in a functional style. One of the key tools do to writing functional code is partial function application, which is available through the functools module.
  on August 28, 2007, 8:38 AM PDT
  Partial application allows you to bind one of the inputs of a function to a constant value, and create a new function that takes only the remaining operations, and keeps the bound input the same among all calls. The following is a simple example which uses the partial function from the functools module with the add function from the operator module, which works in the same way as the "+" operator but can be used as an object.
  Partial is what is called a higher order function, in that it takes a function as input (map and filter are other examples). The partial function is different in that it also returns a function that can be used in the same way as any other function in your program. You can use add1 exactly the same as any other function with one argument, you can apply it, use it as an argument to map or even partially apply it again:
  You can also use partial on object methods, for example to generate a list of defaults strings:
  A less trivial example is adding items to widgets in a GUI with a callback. For the next example we'll be using the Tkinter toolkit, if you're not familiar with it, scan this previous howto. The following code sets up an application window and adds a listbox with a scrollbar:
  To add a string to the listbox, we use the following statement:
  listbox.insert(END, "item")
  This is a bit unwieldy, and can't be used as a callback, since it needs arguments. If you needed to add a lot of items to the list quickly, partially applying the listbox.insert method would let you write the following:
  add = partial(listbox.insert, END)
  Alternatively, if you wanted to use it as a callback you would need to bind the string using partial as well:
  additem = partial(listbox.insert, END, "item")
  Partial function application is useful mainly in cases where you need to apply a range of different input to a single object, or need to bind one of the arguments to a function to be constant. It's not going to make or break your code, but it can make it easier to write, and easier to maintain.