AttributeError: 'str' object has no attribute '__name__'
def log(f):
def fn(x):
print 'call ' + f.__name__ + '()...'
return f(x)
return fn
@log('DEBUG')
def my_func():
pass
def log(f):
def fn(x):
print 'call ' + f.__name__ + '()...'
return f(x)
return fn
@log('DEBUG')
def my_func():
pass
2015-05-14
举报