为什么在编译器里面运行这个代码 运行不出来呢?
def log(f): def fn(x): print 'call ' + f.__name__ + '()...' return f(x) return fn
@log def factorial(n): return reduce(lambda x,y: x*y, range(1, n+1)) print factorial(10)
def log(f): def fn(x): print 'call ' + f.__name__ + '()...' return f(x) return fn
@log def factorial(n): return reduce(lambda x,y: x*y, range(1, n+1)) print factorial(10)
2019-08-08
举报