Python的偏函数
import functools def showag(*args,**kwargs): print(args) print(kwargs) p1 = functools.partial(showag,1,2,3) p1() p1(4,5,6) p1(a = "python" ,b = "itcast")
import functools def showag(*args,**kwargs): print(args) print(kwargs) p1 = functools.partial(showag,1,2,3) p1() p1(4,5,6) p1(a = "python" ,b = "itcast")