python偏函数

偏函数是将创建函数时,将固定参数写死,以至于以后直接调用函数,不用填入默认参数。

用到的库

functools

新方法名称 = functools.partial(方法名称, 默认参数)    #  为某个方法添加固定参数

原文地址:https://www.cnblogs.com/pxfb/p/7863050.html