conf

什么是闭包?

简单说,闭包就是根据不同的配置信息得到不同的结果, 装饰器就是一种闭包, 闭包有效的减少了函数所需定义的参数数目。 python def line conf(a, b): def line(x): return a x + b ret...