Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Josiah Carlson a écrit : > (snip) > > Well, the particular operation is typically called 'currying a > > function', > > <pedantic> > it's not 'currying' but 'partial application'. > > Currying is somehow the reverse of partial : it's a way of building a > multiple-args function from single-args functions. > </pedantic>
Wikipedia says "currying or Schönfinkelisation[1] is the technique of transforming a function that takes multiple arguments into a function that takes a single argument" -- and FWIW I agree with Wikipedia in this case; the reverse (going from single-arg to multiple-args) would be "uncurrying", though I don't think I've ever used that term myself. functools.partial's name may be more precise (because it can, e.g., go from a function taking 3 arguments to one taking 2 -- not just from N down to 1) but your 'pedantic' remark seems pedantically wrong:-). Alex -- http://mail.python.org/mailman/listinfo/python-list