def a():
print 'sss'
print getattr(a, "_decorated_function", a).__name__
it print :
a
thanks
updated
my code:
def a():
w='www'
print getattr(a,'w')
but it print :
Traceback (most recent call last):
File "D:\zjm_code\a.py", line 8, in <module>
print getattr(a,'w')
AttributeError: 'function' object has no attribute 'w'