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")

 

posted @ 2020-03-05 10:19  hui1019  阅读(112)  评论(0编辑  收藏  举报