functools partial

def add(a,b,c):
    return a+b+c
from functools import partial
addone = partial(add,100)
print addone(100,320)

print type(addone) #
print type(add) #

你可能感兴趣的:(functools partial)