延迟绑定出现在闭包问题中。下面我们看一个闭包的例子:
def gen_mul(n): def mul(x): return n*x return mul double = gen_mul(2) doubled_value = double(6) # 12