Partially evaluated functions

Nick Perkins nperkins7 at home.com
Wed Jun 20 14:23:10 EDT 2001


Oh, and one more thing:

The cookbook version is the only one of the three which gives priority to kw
args supplied at call-time over args supplied at create-time.

eg.

def f(color='black'): print color
f2 = curry(f,color='blue')
f2(color='red')

The cookbook version will print 'red', Rainer and Alex both print 'blue'.
(easy to change, of course)






More information about the Python-list mailing list