(continued from previous pagewrap is used to exchange metadata between functions @wraps(funcdef pn(*args**kwargs)print(func __name__return func(*args**kwargsreturn pn if we execute the mathex py againit will show the help features again note@wraps exchanges the metadata between the functions as shown in above example decorators with arguments supposewe want to pass some argument to the decorator as shown belowmathex py from debugex import printname @printname('**'def add num(xy)'''add two numbers''return( +yprint(add num( )help(add numnoteto pass the argument to the decoratorall we need to write outer function which takes the input arguments and then write the normal decorator inside that function as shown belowdebugex py from functools import wraps def printname(prefix="")def addprefix(func)msg prefix func __name__ func is the function to be wrapped wrap is used to exchange metadata between functions @wraps(funcdef pn(*args**kwargs)print(msgreturn func(*args**kwargsreturn pn return addprefix nowrun the above codepython mathex py **add num decorators