Professional Documents
Culture Documents
We can add this functionality using wrapper function. Wrapper function wraps the original function and
execute it before other function and the call original function and completes.
Lets see how we have discovered and changed Imran @ 420 function using decorators.
Now suppose we want to add arguments in the in our original functions. Arguments of the original
functions are passed *arg and **kwarg are used as argument takers in the wrapper functions
Suppose we have discovered that Imran is not 420 and he is actually 720. Then we need to pass on this
to the argument as shown below.
Suppose our decorator has also an argument and it want to print that this a magical program to print
the identity of real legend in computer history 420---The Imran.
LAMBDA FUNCTIONS
MAP Function