为什么@log会报错 undenfined name?
@log
def factorial(n):
return reduce(lambda x,y: x*y, range(1, n+1))
print factorial(10)
Traceback (most recent call last):
File "<ipython-input-19-b7e3e37803c1>", line 1, in <module>
@log
NameError: name 'log' is not defined