Monty @ The Python Coding Place @thepythoncodingplace.com · Mar 8

Not too hard to fix. In `inner()` you can store whatever `func()` returns to a variable, say `value`. Then, you can `return` this value. (Yes, you can put the `return` keyword directly in front of `func()` if you prefer)

0 likes 1 replies

?

Replies

Monty @ The Python Coding Place · Mar 8

Congratulations, you wrote a decorator. The function `store_arguments()` is a decorator. You can use it to decorate any function and the decorated function will retain information about all the arguments passed to it each time you call it.