News for hackers. Stuff that matters.
Re:Rudimentary Currying and Partial Application in Python by jmillikin on Thursday June 11, 2009 @05:38PM (#653681)
http://docs.python.org/library/functools.html#functools.part...

This already exists in the standard library as functools.partial, except the stdlib version is better in nearly every way.

Re:Rudimentary Currying and Partial Application in Python by brutimus on Friday June 12, 2009 @12:05AM (#654162)
The one place where the functools.partial failed me was in partialing on class methods. functools.partial actually gives you a callable class, instead of the functional closure that this example gives you (though I don't really consider this to be that great of an example). When a class is instantiated, the method functions (unbound methods) are turned into bound methods, something a class can't be. Guido talks about this a bit whole process here... http://python-history.blogspot.com/2009/02/first-class-every...
Re:Rudimentary Currying and Partial Application in Python by ighost on Friday June 12, 2009 @02:08AM (#654260)
So python guys are still looking for the One True Way to do this? How unpythonic.
Re:Rudimentary Currying and Partial Application in Python by ighost on Thursday June 11, 2009 @10:57PM (#654095)
I agree, but this "rudimentary" version is easier to understand for someone new to functional programming. It trades generality for pedagogical clarity.