Skip to content

Commit

Permalink
Add func call to Nesting a Decorator Within a Function (#192)
Browse files Browse the repository at this point in the history
'Nesting a Decorator Within a Function' code does not ever actually call the func,
so this commit adds execution and returns the wrapped function result when tagged with decorator.
  • Loading branch information
emheld authored and yasoob committed Oct 19, 2019
1 parent f2159f7 commit a8834de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions decorators.rst
Expand Up @@ -354,6 +354,7 @@ us specify a logfile to output to.
with open(logfile, 'a') as opened_file:
# Now we log to the specified logfile
opened_file.write(log_string + '\n')
return func(*args, **kwargs)
return wrapped_function
return logging_decorator
Expand Down

0 comments on commit a8834de

Please sign in to comment.