Error: call factorial()
import time
def performance(unit):
def log_perf(f):
def perf(*args,**kw):
print '[%s]%s()...'%(unit,f.__name__)
return f(*args,**kw)
return perf
return log_perf
@performance('msdfas')
def factorial(n):
return reduce(lambda x,y: x*y, range(1, n+1))
print factorial(10)