I am curious why the ‘outside’ decorator function is necessary when it seems to be that the contained wrapper function is the one doing the heavy lifting.
def some_decorator(): def some_wrapper(): some_operation return some_operation @ some_decorator def decorated_function() ...
It is unclear to me why above we could not just define the wrapper function and then use this function as the decorator with the
Also, why are we not returning anything from within the
Thanks in advance!