from functools import wraps
def aNewDecorator(aFunc):
@wraps(aFunc)
def wrapTheFunction():
print("Iam doing some boring work before executing aFunc().")
aFunc()
print("Iam doing some boring work after executing aFunc().")
return wrapTheFunction
@aNewDecorator
def aFunctionRequiringDecoration():
print("Iam the function which needs some decoration to remove my foul smell")
print(aFunctionRequiringDecoration.__name__)
0 Answer(s)