binding more than one attribute in a facntion

linuxnow at gmail.com linuxnow at gmail.com
Wed Jul 26 15:33:20 EDT 2006


I want to have a bound method that "fixes" more than one parmeter of a
funtion. LEt me post an example.

def f(a, b, c):
    return a + b + c

I can do:
fplus10 = f(10)
and then call f with 2 params and it works.

But, how can I fix 2 params:
fplus10plus20 = f(10,20)
ignores the second param.

fplus10plus20= fplus10(20)
does not work either.

Can anybody show what I'm doing wrong?




More information about the Python-list mailing list