python 闭包 Posted on 2017-11-Sun Edited on 2018-04-Sun Views: Views: 123456789101112131415def two_type(t=1): def dec(fun): def real_fun(x): if t == 1: print ("i am real") else: print ("i am false") fun(x) return real_fun return dec@two_type(t=0)def fun(x): print(2*x)fun(2)