0 目的python decorator1 设备HP+windows72 步骤def f(x): def g(): x() return g @f def h1(): print "H1" h1() 3 原理h1()@fx <- h1g