Peter Otten wrote: > [EMAIL PROTECTED] wrote: > Bound methods are limited to one implicit parameter. What you need is > partial function application: > > >>> def f(a, b, c): > ... return a + b + c > ... > >>> def partial(f, *args): > ... def g(*more): > ... return f(*args+more) > ... return g > ... > >>> partial(f, 1, 2)(3) > 6 > >>> partial(f, 1)(2, 3) > 6 > >>> partial(f)(1, 2, 3) > 6 > > See http://www.python.org/dev/peps/pep-0309/ for more.
Thanks, this explanation is great. Nice to see also that python 2.5 will have it, -- http://mail.python.org/mailman/listinfo/python-list